The Core Idea
A content delivery network is a fleet of servers spread across many cities. Instead of every request travelling to one distant origin, the user connects to a nearby edge node. Shorter distance means lower latency and less load on your servers.
What Lives at the Edge
- Cached responses such as images, scripts, and video segments
- A map of which edge is closest to each user, usually resolved through DNS
- Connection termination so the slow first handshake happens nearby
When an edge has the file, it serves a cache hit in milliseconds. When it does not, it fetches from origin, stores a copy, then replies. The next user in that region gets a hit.
Why It Matters
- Faster page loads because bytes travel a shorter path
- Lower origin cost since most traffic is absorbed at the edge
- Better resilience because one origin outage does not take down every region
Key idea
A CDN spreads cached copies across many edge locations so users connect to a nearby node, cutting latency and shielding the origin from most traffic.