1 of 4

Your RightSignal

How the internet works · 9 of 101 / 3

Content delivery networks

The concept

Why a website hosted in California loads instantly in Berlin

A content delivery network (CDN) keeps copies of a site's files on edge servers in hundreds of cities, so readers fetch them from nearby. The site's own server, called the origin, stays in one place.

A Berlin reader opens a news site whose origin is in California, 9,000 km away. Without a CDN, every request makes a round trip over that distance, there and back. With one, the images come from an edge server in Frankfurt.

Distance matters because light in optical fibre covers only about 200,000 km per second. You can buy more bandwidth, but you can't beat the speed of light, so the only way to cut that delay is to shorten the trip.

What it’s forEstimates the shortest possible round-trip time between a reader and a server.

RTT ≈ 2 × d ÷ v

RTT
round-trip time: how long a request takes to go out and its reply to come back
d
distance to the server along the fibre, in km
v
speed of light in fibre, about 200,000 km per second

What it givesA lower limit on the delay. Real routes are longer and less direct, so real round trips take longer.

  1. Origin 5,000 km away: 2 × 5,000 ÷ 200,000 = 0.05 s = 50 ms
  2. Edge 50 km away: 2 × 50 ÷ 200,000 = 0.0005 s = 0.5 ms
  3. 4 round trips (TCP, TLS, request): 200 ms vs 2 ms