Networking & Traffic Management
CDNs
A content delivery network caches content at points of presence close to users, cutting round-trip latency and shielding the origin from the bulk of read traffic.
- CDN = a geographically distributed set of edge caches (PoPs) that serve cached content from a location near the requesting user
- Pull CDN: the edge fetches from origin on first miss and caches per TTL — the common case for most web/API content, requiring no upfront upload step
- Push CDN: content is proactively uploaded to edge nodes ahead of time — used when content is large, known in advance, and rarely changes (e.g. software releases)
- Cache hit ratio at the edge is the key efficiency metric; rare or long-tail content still round-trips all the way to origin on every request
- "Origin shielding" (a mid-tier regional cache in front of the real origin) prevents many PoPs missing simultaneously from all hammering the origin at once
| Pull | Push | |
|---|---|---|
| Population | Lazy — fetched from origin on first miss | Proactive — uploaded ahead of time |
| Best fit | Web/API content, unpredictable access patterns | Large files, known in advance, infrequently updated |
| Origin load | One request per PoP per miss (mitigated by shielding) | One upload, then none — origin barely involved afterward |