Problem
Every request travels to a central origin, adding round-trip latency for distant users and concentrating load on origin servers. Traffic spikes for popular content overwhelm the origin even though responses rarely change.
Also known as: edge-cache, content-delivery-network
Serve cacheable responses from points of presence near users to cut latency and offload the origin.
Every request travels to a central origin, adding round-trip latency for distant users and concentrating load on origin servers. Traffic spikes for popular content overwhelm the origin even though responses rarely change.
A CDN moves cacheable content closer to users. Each point of presence stores responses and answers repeat requests without contacting the origin, which reduces both latency and origin load. The two numbers that matter are cache hit ratio and time to first byte.
Client -> Edge PoP -> Regional shield -> Origin
(hit: return) (hit: return) (miss: render + store)
The origin controls behavior with headers:
Cache-Control: public, max-age=60, s-maxage=600, stale-while-revalidate=30
Here browsers keep the object for 60 seconds, shared caches for 10 minutes, and the edge may serve a stale copy for 30 more seconds while it revalidates in the background. A shield tier collapses misses from many edges into one origin request. Immutable assets use fingerprinted file names such as app.3f9a1c.js with a one-year max-age, so no purge is ever needed.
Per-GB egress and request fees; offsets origin cost
Medium: tune TTLs, purges and cache keys
Medium: layered cache semantics
Private or user-specific response cached and served to others
Stale content persists after a failed purge
Origin overwhelmed when a popular object expires everywhere at once