Content Delivery Networks (CDNs)
Physical distance is a latency floor no server capacity fixes — a CDN's whole job is shrinking that distance.
Beginner
| What a CDN reduces | How |
|---|---|
| Latency | Physical distance to the serving server shrinks from continent-spanning to regional. |
| Origin load | One edge server can serve the same cached photo to thousands of nearby users without ever asking the origin again. |
| Bandwidth cost | The origin sends the file to each region's edge once, not once per end user in that region. |
| Model | How content gets to the edge | Trade-off |
|---|---|---|
| Pull (on-demand) | The edge server fetches content from the origin on the first request for it (a cache miss), then serves cached copies to subsequent requests. | Simple to operate — new content is automatically available without a manual push step, but the very first request in each region pays full origin latency. |
| Push | The origin proactively uploads content to edge locations ahead of time. | Every user gets edge-speed delivery immediately, but requires knowing in advance what to distribute and where — more operational overhead. |
| Component | Role |
|---|---|
| Routing system | Directs each client to its nearest healthy edge location, informed by client geography and real-time load/health data. |
| Edge (proxy) servers | Serve cached content from RAM/SSD; the actual point of contact for end users. |
| Distribution system | Propagates content from the origin out to edge servers. |
| Origin servers | The authoritative source for content the edge doesn't have cached. |
| Scrubber servers | Filter malicious traffic (e.g. during a DDoS attack) before it reaches the origin. |