Put the user and the server in different cities below and watch the wait grow with the distance.

12,180 km apart · one round trip ≈ 168 mspage shows in ≈ 545 ms

Every request makes the trip about three times (handshake, then the request itself) before the server even starts working. Move the user or the server and watch the bar — no faster server changes the distance.

First-principles estimate (light in fibre at ~200,000 km/s, 1.3× path length, routing overhead, ~40 ms of server work). Real numbers vary with routes and load.

Latency is the wait between asking and getting an answer. Most of it is just distance: the request has to travel there and back.

MDN: "Latency is the network time it takes for a requested resource to reach its destination." Low latency feels instant; high latency is the wait you can feel.

The biggest cause is distance. A request to a server on the far side of the world travels there and back no matter how fast your code is, and each step along the way (looking up the address, connecting, the server's own work) adds a little more.

The fix is to answer from nearby, which is what an edge or CDN does. This site runs at Cloudflare's edge, so a reader in Singapore and one in New York each get a copy served from close to them, not from one distant origin.

That's also why "but it's fast for me" is misleading: you may be near the server, or getting a cached copy. Someone far away, or on a slow connection, feels every extra millisecond you don't.

Try it with the rules off. In the sandbox, put the user in Kathmandu and the server in San Francisco and watch the round trip. Then switch on the edge cache and watch the same request get short.

Check yourself

0/4 got it

Saved on this device only. No account, no streaks.

Next in when it breaks: What is caching?.