Skip to main content
Cloud & AI Hub
Browse
Glossary AI Directory Playgrounds Models Prompts Explainers Strategy Matrix Benchmark Decoder

Content Delivery Network (CDN)

A distributed network of edge servers that caches content closer to users.

What is a CDN?

A CDN stores copies of static assets β€” images, JavaScript, CSS, videos β€” on servers around the world. When a user in Tokyo requests your site, they often receive files from a nearby edge node instead of your origin server in Virginia.

How it works

  1. First request for a file may go to your origin (S3, web server, etc.)
  2. The CDN caches the response at the edge
  3. Subsequent requests are served from cache until TTL expires

Benefits

  • Lower latency β€” shorter physical distance to content
  • Reduced origin load β€” fewer hits to your primary infrastructure
  • DDoS absorption β€” large CDNs can absorb traffic spikes at the edge
  • TLS termination β€” certificates managed at edge locations

What CDNs cache well

Static files, public API GET responses (with correct cache headers), and streaming video segments. Dynamic personalized pages usually bypass cache or use short TTLs.

Cloudflare, Fastly, Akamai, Amazon CloudFront, Azure CDN, and Google Cloud CDN. Many teams use a CDN in front of object storage for global static hosting.

Cost reality

CDNs are usually the cheapest bandwidth you can buy β€” often cheaper than serving from your origin, since cached hits never touch your servers. The catches: per-request fees add up on millions of tiny files, and misconfigured cache headers quietly send everything to the origin at full price. Check your cache hit ratio monthly; below ~80% for static-heavy sites means money is leaking.

What people get wrong

  • Caching without a purge plan. Deploying new JS while the CDN serves week-old copies is the classic β€œworks on my machine, broken for users” incident β€” version your asset filenames.
  • Trusting default headers. No Cache-Control often means no caching; the CDN becomes an expensive pass-through.
  • Putting authenticated, personalized pages behind aggressive caching. One user seeing another’s account page is a breach, not a bug.

Historical figures and technical concepts for informational purposes only. Not technical, professional, legal, or financial advice. Sources: Official Documentation.