Definition
What it is
A CDN is a reverse proxy at planetary scale. When a user requests an image, a CSS file or an API response, DNS routes the request to the nearest CDN edge node. If the node has the content (a cache hit), it serves it directly, in milliseconds. If not (a cache miss), it fetches from the origin server, caches a copy, and serves it. Subsequent users in that region get the cached copy.
Examples: Cloudflare, Akamai, Fastly, AWS CloudFront, Bunny.net, Google Cloud CDN. All offer the same fundamentals: edge caching, TLS termination, DDoS mitigation, and origin shielding.
Why it matters
Light in fiber travels at ~200,000 km/s. A request from Sydney to a server in Frankfurt takes ~150 ms round-trip. From a CDN edge in Sydney, it takes ~5 ms. That is a 30× improvement, purely from physics. The CDN also absorbs DDoS traffic, reduces origin bandwidth costs, and keeps the site up when origin fails (if configured to serve stale).
CDN vs reverse proxy vs load balancer
Aspect | CDN | Reverse Proxy | Load Balancer |
|---|---|---|---|
Scope | Global, edge nodes | Single region | Single region |
Primary role | Cache + latency | Cache + routing | Distribute traffic |
TLS | Yes | Yes | Often |
Example | Nginx, Varnish | HAProxy, AWS ALB |
How a CDN serves a request
sequenceDiagram
participant U as User
participant E as CDN Edge
participant O as Origin
U->>E: GET /img.jpg
E->>E: Cache hit?
alt Hit
E-->>U: 200 OK (cached)
else Miss
E->>O: GET /img.jpg
O-->>E: 200 OK
E->>E: Cache
E-->>U: 200 OK
end
Timeline
1995 — MIT researchers propose "content delivery" to solve the "hot spot" problem.
1998 — Akamai launches the first commercial CDN.
2008 — Amazon CloudFront launches.
2009 — Cloudflare launches with free tier.
2018 — Cloudflare Workers introduces edge compute.
2024 — Edge compute standard: Vercel Edge, Deno Deploy, Fastly Compute@Edge.
How to use a CDN well
A CDN that helps, not hurts
Cache-Control is the contract
public, max-age=31536000, immutablefor hashed assets.no-storefor private data. The CDN obeys the header.Versioned URLs
/app.css?v=1234or/app.a1b2c3.css. When you deploy, the URL changes, the CDN sees a new resource.Purge by tag, not by URL
Tag assets with their deployment ID.
purge tag:release-42is instant; purging URL-by-URL takes minutes.Stale-while-revalidate
Serve stale content while fetching fresh in the background. Users never wait; the cache updates on its own.
Common failures
Origin
In 1995, Tim Berners-Lee and MIT researchers identified the "hot spot" problem: a single popular URL could overwhelm the origin. The solution was a content delivery network: replicate content to edge nodes. Akamai, founded by Tom Leighton and Danny Lewin, launched the first commercial CDN in 1998. Cloudflare, founded in 2009, offered free tiers, expanding the market. Today, "CDN" is standard infrastructure.
A CDN is a system of distributed servers that deliver pages and other web content to a user, based on the geographic locations of the user, the origin of the webpage and the content delivery server.
— Cloudflare, *What is a CDN?*, 2024
Evidence
FAQ
- CDN vs reverse proxy?
A reverse proxy is a single cache; a CDN is a globally distributed network of caches.
- Does a CDN help SEO?
Yes: faster sites rank better, and CDNs improve uptime.
- How to purge?
By URL, by tag, or by wildcard. Tag is best: a single API call clears everything for a release.
- CDN for dynamic content?
Yes, via edge compute (Cloudflare Workers, Vercel Edge). Dynamic requests can run at the edge.
Connections
Cloudflare (2024). What is a CDN? https://www.cloudflare.com/learning/cdn/what-is-a-cdn/
Fielding, R. et al. (2022). RFC 9111: HTTP Caching. https://www.rfc-editor.org/rfc/rfc9111.html
Leighton, F. T. (2001). The challenges of delivering content on the Internet. https://doi.org/10.1007/3-540-44636-2_1
Karger, D. et al. (1997). Consistent Hashing and Random Trees. STOC '97. https://doi.org/10.1145/258533.258660
Etymology
Origin: acronym
C(noun): ContentD(noun): DeliveryN(noun): Network
Semantic network
● broader ● narrower ● related
Used in the garden
- Core Web Vitals Optimization: The Complete Technical Guide (9×)
- The Day 5,000 WooCommerce Products Demanded a File-Based CMS Migration (5×)
- Technical SEO: The Brand Trust Signal No One Talks About (But Google Loves) (4×)
- Technical SEO: Speed, Core Web Vitals, and Crawl Optimization (4×)
- LatAm Startup's Lifeline: Core Web Vitals Audit Doubles Conversions in 48 Hours (4×)
- Technical SEO for consultants (3×)
- Technical SEO, Core Web Vitals, and Mobile SEO: The Complete Guide (3×)
- Unmasking the Silent Killer: How Slow Websites Steal 30% of Your SaaS Revenue (3×)
- The Zero-Downtime WordPress Migration Blueprint for High-Stakes Sites (3×)
- International SEO: How to Rank Your Brand in Multiple Markets (2×)
- E-commerce SEO: Optimizing Your Online Store (2×)
- The Integrated Strategy Guide: Branding, SEO, and Digital Marketing in Harmony (1×)
- Architecting API Dominance: Design a REST API That Scales From Day One (1×)
- Mobile SEO: Mobile-First Indexing and Mobile Experience Optimization (1×)
- The Unseen Battlefield: How Server Logs Uncover Your SEO Power (1×)
- The Ultimate SEO Guide: How to Dominate Search Engines (1×)
- Advanced SEO, Local, E-commerce, and Future Trends: The Complete Guide (1×)
- UX as the Bridge: How User Experience Connects Branding and SEO (1×)
- From Script to Microservice: Scaling Reporting Automation to 10K Daily Requests (1×)
- Technical SEO Audit: Uncover & Fix Hidden Ranking Leaks for Dominance (1×)
Sources
Cloudflare (2024). What is a CDN? https://www.cloudflare.com/learning/cdn/what-is-a-cdn/
Fielding, R. et al. (2022). RFC 9111. https://www.rfc-editor.org/rfc/rfc9111.html