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
CDN request flow
A shield tier absorbs simultaneous misses from many edge PoPs so the origin only ever sees one request per miss, not one per PoP
Pull vs push CDN
PullPush
PopulationLazy — fetched from origin on first missProactive — uploaded ahead of time
Best fitWeb/API content, unpredictable access patternsLarge files, known in advance, infrequently updated
Origin loadOne request per PoP per miss (mitigated by shielding)One upload, then none — origin barely involved afterward
Sources
  • Web Scalability for Startup EngineersCh. 9 — Content Delivery Networks
  • System Design: The Big Archive (2024 ed.)Networking — CDN Fundamentals