Software Engineering Glossary

Content Delivery Network (CDN)

Also known as: CDN Edge Network Content Distribution Network

A content delivery network is a global fleet of edge servers that cache content close to users. When someone requests a file, the CDN serves it from a nearby edge instead of the far away origin, which cuts latency, absorbs traffic spikes, and shields the origin from load. CDNs handle static assets, and increasingly dynamic content and APIs too.

Key Takeaways

  • A CDN moves content near the user. Shorter distance means lower latency and fewer round trips.
  • It offloads the origin. Most requests are served from the edge cache, so the origin sees only misses.
  • Cache invalidation and TTLs are the hard part. Stale content at the edge is the most common CDN bug.
  • CDNs route users to the nearest edge with anycast and DNS, which is a form of geographic load balancing.

How It Works

  1. Content is replicated to edge locations, or pulled and cached on the first request (pull CDN).
  2. A user’s request is routed to the nearest edge using anycast routing or DNS.
  3. On a cache hit the edge serves the content directly. On a miss it fetches from the origin, caches it, then serves it.
  4. TTLs and purge APIs control how long content lives at the edge before it is refreshed.

Where It Is Used

  • Akamai, Cloudflare, Amazon CloudFront, and Fastly are the major CDN providers.
  • The original consistent hashing work at MIT was motivated by CDN caching for Akamai.
  • Netflix runs its own CDN, Open Connect, placing appliances inside ISP networks to stream video.

Related glossary terms

Advertisement