A website hosted in one American city loads at similar speed almost everywhere. That consistency comes from a distribution layer that keeps copies of the site's files near the people requesting them.

Distance costs time no engineering can remove

Signals travel through fiber at a fixed fraction of light speed, so a request crossing the continent and returning takes a measurable amount of time regardless of bandwidth.

Loading a modern page requires many such round trips, for the page itself, then stylesheets, scripts, fonts and images. Each one pays the distance charge again.

Adding capacity does not help, because the constraint is latency rather than throughput. The only remedy is to shorten the distance, which means moving the content closer.

Edge servers hold cached copies

A delivery network operates data centers in many metropolitan areas. Each stores copies of files it has recently served, keyed to the address that was requested.

When a nearby reader asks for the same file, the edge server answers from its own storage without contacting the origin. The origin server may go hours without being touched.

Files that change rarely, such as images and compiled scripts, cache well. Pages personalized for each visitor cache poorly, which is why sites separate the two.

Routing sends each request to a close server

Two mechanisms steer traffic. One answers name lookups with an address chosen for the asking network; the other advertises the same address from many locations so ordinary routing finds the nearest.

The second approach, known as anycast, means thousands of machines share one address. The network's own path selection does the work of picking a destination.

Neither method is precise about geography. They optimize for network topology, which usually but not always corresponds to physical distance.

Invalidation is the hard problem

Once copies are spread across many locations, changing the original does not change them. Each copy carries an expiry time after which it is refreshed.

Setting long expiries makes a site fast and updates slow. Publishers work around this by embedding a version marker in file names, so a change produces a new address that was never cached.

Stale content after a deployment is one of the most common failures in web operations, and it almost always traces to a cached copy rather than to the update itself.

The layer does more than speed

Because all traffic passes through it, the same network can absorb floods of malicious requests and filter them before they reach the origin.

That concentration has a cost. A configuration error at one large provider can make a substantial share of the web unreachable at once, as periodic outages have shown.