01

The problem of distance

When you open a website, your device has to fetch dozens or even hundreds of files: text, images, styles, scripts and video segments. If they all live on a single server on another continent, every request must travel there and back. Even at the speed of light, that takes time, and loading a page involves many such round trips. A content delivery network, or CDN, solves this by keeping copies of a site's files on servers placed in many cities, often inside internet exchanges and local providers' networks. A visitor in Abu Dhabi can then be served from a nearby machine rather than from the company's original server in the United States or Europe.

02

Edges, caches and origins

The site's own server is called the origin. The CDN's servers, grouped in locations known as points of presence, sit at the edge of the network near users. When a request arrives, the network directs it to a nearby edge, usually by giving different answers to the address lookup depending on where the user is, or by announcing the same address from many places at once. If the edge already holds the file, a cache hit, it sends it immediately. If not, a cache miss, it fetches the file from the origin, delivers it and keeps a copy for the next visitor. Site owners set how long each file may be stored before it must be checked again.

03

A worked example

Light travels through glass fibre at roughly 200,000 kilometres per second. Dubai and New York are about 11,000 kilometres apart in a straight line, so a request and its reply cover at least 22,000 kilometres. That takes 0.11 seconds, or 110 milliseconds, before allowing for the longer routes cables actually take and the time spent in routers. A page that needs ten sequential exchanges with that distant server would spend more than a second just waiting for signals to travel. A server in the same city might be a few dozen kilometres away, so the travel time becomes almost negligible. Faster connections cannot fix this kind of delay; only shorter distances can.

04

More than speed

CDNs bring benefits beyond quicker pages. Because most requests are answered at the edge, the origin server handles a small fraction of the traffic, so a news site can survive a sudden surge of readers without collapsing. Large video services and software companies rely on CDNs, or build their own, to deliver films and updates to millions of devices at once without overloading long-distance links. The spread-out design also helps against floods of malicious traffic, since attacks are absorbed across many locations. Most CDNs also handle encryption for websites, and many now run small programs at the edge, so some processing can happen near users rather than in one central data centre.

05

From one idea to a backbone

The approach took shape in the late 1990s, when popular sites were buckling under traffic and the phrase 'world wide wait' was a common joke. Akamai, founded in 1998 by researchers from the Massachusetts Institute of Technology, was one of the first companies to distribute content across thousands of servers. Since then, commercial CDNs, cloud providers and the largest internet companies have built vast edge networks, and a large share of all web traffic now passes through them. In the Gulf, the growth of data centres and exchange points has encouraged providers to place more edge servers in the region, reducing dependence on long routes to Europe and Asia.

06

Limits and single points

Not everything can be cached. A shared image or a video segment is the same for everyone, but your bank balance, inbox or shopping basket is personal and must come from the origin, though the CDN can still speed up the route. Stale copies are another risk: if a site changes a file but the edge keeps the old version, visitors may briefly see outdated content until the copies are refreshed. And concentration has a cost. In June 2021 a configuration error at the CDN provider Fastly briefly knocked many major news, government and shopping sites offline at the same time, showing how much of the web now rests on a few shared networks.

FOLLOW THE EVIDENCE

Sources & further reading

Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.