cache stampede
Many callers rebuild the same missing or expired cache entry at once.
Use this when A popular key’s expiration causes a burst of expensive work.
without the term
“Every hour when the homepage cache expires, the database spikes to 100% because every request tries to rebuild it at the same time. Can you stop that?”
with the term · How do you ask a model for cache stampede?
Prevent a stampede on this cache entry. Test simultaneous misses and a failed refresher without leaving readers blocked indefinitely.
What is cache stampede?
A popular cache entry expires and hundreds of requests all try to rebuild it at once, overloading the database. The fix is one rebuild with others waiting or getting slightly stale data.
Why does cache stampede matter when vibe coding?
A correct cache miss path can still overload its dependency under concurrency.
How do you do cache stampede?
Choose refresh coordination and a bounded wait or stale-response policy.
What goes wrong with cache stampede?
Using an in-process lock while every instance independently rebuilds the same value.