Interview Questions/Troubleshooting Scenarios/Cache Stampede / Thundering Herd
IntermediateScenario
10 min

Cache Stampede / Thundering Herd

CachingPerformanceReliability
Advertisement
Interview Question

A cache eviction triggers a surge of requests to the origin, causing overload. How do you diagnose and prevent cache stampede?

Key Points to Cover
  • Identify synchronized TTL expirations causing origin spikes
  • Implement jittered TTLs and request coalescing/locking
  • Use stale-while-revalidate and early refresh
  • Protect origin with rate limits and circuit breakers
  • Instrument cache hit ratio and origin QPS
Evaluation Rubric
Recognizes synchronized expirations30% weight
Applies anti-stampede patterns30% weight
Shields origin effectively20% weight
Tracks CHR and origin load20% weight
Hints
  • 💡Look for aligned TTLs across nodes.
Potential Follow-up Questions
  • How to do request collapsing in your stack?
  • What about per-key rate limits?
Advertisement