Skip to content
StackDecode
System Design
7. Caching ArchitectureAnimated

CDN Caching

Caching content at the network edge.

The idea

Edge servers cache responses by URL and obey cache headers.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

UserCDN edgeOriginGET /video.mp4
  • current message
  • earlier
  • failure or attack

The user is routed to the nearest edge location.

step:
1/6
from:
User
to:
CDN edge
1/6

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1User requests a URL
  2. 2Edge checks its cache
  3. 3On miss fetch from origin
  4. 4Serve and cache

Where it is used

Static files and media.

Watch out for

Purging and personalised content.

Related