Networking6h estimated

CDNs & Caching

Difficulty
Importance

The problem

Sending every request across the entire globe to one origin server is slow and puts the whole load on one place — content delivery networks push copies of content physically closer to users and absorb repeat requests, cutting both latency and origin load dramatically.

Why now

HTTP fundamentals and DNS already established how a request finds and reaches a server; CDNs and caching change *which* server actually answers, and *how often* the real origin is bothered at all — an optimization layered entirely on top of the request/response model already in place.

Mental model

A cache is a shortcut: answer from a nearby copy instead of doing the full expensive work again, as long as the copy is still considered fresh. A CDN is that idea distributed geographically — many small caches near users instead of one big origin server far away — with DNS often doing the trick of directing each user to their nearest copy transparently.

Requires

Unlocks

Used in

Projects

  • Inspect the Cache-Control and ETag headers on responses from a real website and explain the caching behavior they specify
  • Diagram how a CDN serves a cached asset to a user without ever contacting the origin server, and when it would need to

Examples

  • A Cache-Control: max-age=3600 header tells browsers and CDNs to reuse a response for up to an hour without re-checking
  • A user in Tokyo and a user in London requesting the same CDN-hosted image are served from two different physically nearby edge servers

Resources

Mastery checklist