~learn.
0:00 / 1:16
W00 · Foundations

Your API answers in 1 ms. London still waits 55.

transcript

You tune your API in New York down to 1 millisecond. Your London users still wait over 55 for every round trip. Why?

Light in fibre covers about 200,000 kilometres a second. New York to London is about 5,500 kilometres. There and back, at least 55 milliseconds. No code can beat that.

Same rack? Half a millisecond. Another zone in the region, 1 to 2. Another region on the continent, up to 50. Another continent, up to 200. Distance is the bill.

So buy a 10 gigabit link? That speeds up sending big payloads. But it can't make light travel faster. Bandwidth can't fix physics. What helps is distance. Serve London from a region near London. Or put a CDN at the edge, close to your users.

And every round trip you skip saves the full 55. Pool connections. Resume TLS sessions. Fewer round trips, or shorter ones. That's the whole game.

You can tune your code forever. You can't tune the speed of light. So move the server, not the code.

Full breakdown in the lecture.