Interview Prep/Networking/Load Balancing, Proxies & CDN

A cache stampede hits your origin when a popular object expires. How do you protect the origin?

AdvancedScenarioLoad Balancing, Proxies & CDN
Answer

Situation read → Many edge nodes request the same object simultaneously on a miss.

What I'd do →

  1. Enable origin shield (CloudFront) or a regional cache layer to collapse requests
  2. Use request collapsing and stale-while-revalidate / stale-if-error headers
  3. Add jitter to TTLs so objects don't expire together
  4. Rate-limit and autoscale the origin
  5. Pre-warm important URLs after deploy

Why → Collapsing concurrent misses into one origin fetch turns a thundering herd into a single request.

Interview tip → Mention stale-if-error as a cheap availability feature.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN