<arch.design/>
Principles/CDN Architecture
~NetworkNetworkingintermediate1998edgecachelatencypop

CDN Architecture

Serve content from edge nodes geographically close to users, drastically reducing latency and origin load.

5/5
~
Operates at: Network level

Network layer — DNS, CDN, load balancers, routing

Interactive visualization

Live
Tokyono cacheLondonno cacheSão Paulono cacheSydneyno cache👤User (JP)👤User (UK)👤User (BR)👤User (AU)Origin Serverus-east-1Cache HITCache MISSOrigin fetch
Tokyo
0H / 0M
cold
London
0H / 0M
cold
São Paulo
0H / 0M
cold
Sydney
0H / 0M
cold

How it works

A Content Delivery Network (CDN) is a globally distributed network of proxy servers (Points of Presence / PoPs) that cache and serve content closer to end users.

When a user requests an asset, DNS routes them to the nearest PoP. If the PoP has it cached (cache HIT), it's served immediately with sub-millisecond latency. On a cache MISS, the PoP fetches from the origin, caches it, and serves it.

Modern CDNs (Cloudflare, Fastly, CloudFront) go beyond static assets: edge computing (Cloudflare Workers, Lambda@Edge) runs code at the PoP; dynamic acceleration optimises routing for non-cacheable requests; anycast routing distributes load globally.

Why it matters

Network latency is proportional to physical distance. CDNs collapse this distance for users worldwide, improving load times and absorbing traffic spikes that would overwhelm origin servers.

When to use

  • Any public web application with global users
  • Static assets (JS, CSS, images, video)
  • API responses that can be cached even briefly
  • DDoS mitigation via edge absorption

When NOT to use

  • Highly personalised or real-time data that can never be cached
  • Internal applications with users only in one region

Trade-offs

+

Dramatic latency reduction for global users

Cache invalidation is complex — stale content risks

+

Absorbs traffic spikes at the edge

Costs scale with bandwidth egress

In production

Cloudflare

330+ PoPs serving 20%+ of all web traffic

Netflix

Open Connect CDN delivers 99%+ of streaming traffic from ISP-embedded appliances

Industry adoption

5/5Ubiquitous — used at virtually every scale-focused company.

Related principles