Content Delivery Networks
System Design: lesson 6 of 15
Distance is latency you cannot optimise away.
Lesson 6 of 15 · 5 min
Content Delivery Networks
Step 1 of 11
Distance is latency you cannot tune away. A CDN keeps copies near the visitor.
The Idea
A CDN keeps copies of your static files on servers spread across the world and routes each visitor to a nearby one. Bytes then travel hundreds of kilometres instead of crossing an ocean, which no amount of server tuning can fix. Your origin only ever sees the misses.
Real-World Example
A machine-tool maker stocks common spares in regional depots. A snapped drive belt is replaced the same afternoon instead of waiting on a shipment from the factory. Rare parts still come from the central warehouse, and nobody pretends every depot can hold one of everything.
The Tradeoff
The edge holds copies, so a bad deploy is now cached in fifty places and purging takes minutes rather than seconds — versioned filenames dodge that entirely. Content that is personal or differs per request has nothing to reuse; mark it private and let it skip the edge.
Your turn
Put the steps in the right order.
- The edge stores the file under its cache rules and serves it
- The visitor's request is routed to the nearest edge location
- Later visitors nearby are served without the origin being touched
- On a miss, the edge fetches the file once from the origin
Mini quiz
1 / 3