What Is a Content Delivery Network (CDN)? Edge Caching Explained
A Content Delivery Network (CDN) is a geographically distributed network of proxy servers and data centers that delivers web content to users with maximum speed and availability by caching assets near the user's physical location.
💡 Plain-English Analogy
If you live in Sydney, Australia, and want to buy a book from an author in London, shipping it takes weeks. But if the author places inventory in a local Sydney warehouse, you receive the book tomorrow. A CDN puts copies of a website's images, styles, and scripts into local warehouses (edge servers) in every major city on Earth.
⚙️ Architecture & Under the Hood
CDNs utilize Anycast BGP routing to steer user requests to the topologically closest Point of Presence (PoP). Edge servers evaluate cache-control headers (stale-while-revalidate, max-age) to serve static assets instantly from memory/SSD, shielding the origin server from high concurrency spikes and mitigating volumetric DDoS attacks.
How CDN Edge Caching Reduces Latency
By terminating the TCP/TLS connection near the user, CDNs slash round-trip time (RTT).
Without CDN:
[User in Tokyo] ══════════════ (180ms Latency across Pacific) ══════════════▶ [Origin Server in New York]
With CDN:
[User in Tokyo] ──(5ms)──▶ [Tokyo CDN Edge PoP (Cached)] ──▶ Instant Response!
│ (Cache Miss only)
▼
[Origin Server in New York]
Frequently Asked Questions
Can dynamic API responses be cached on a CDN?
Yes, if configured with careful Cache-Control and Vary headers. Edge compute platforms (Cloudflare Workers, Vercel Edge Middleware) can even execute lightweight serverless code directly at edge nodes.