Cache Stampede
also called Dog-piling, Thundering Herd on Cache
Many concurrent requests missing on the same expired key and all recomputing it simultaneously, converting one expiry into a load spike.
A hot key serving ten thousand requests per second expires. Every in-flight request misses, and ten thousand identical database queries arrive at once. The database saturates, the recomputation slows, so the window during which everyone is missing gets longer, so more requests pile in.
Three defences, and a serious design uses at least two:
Request coalescing (single-flight). Concurrent misses for the same key result in one computation; the rest wait for it. Removes the problem by construction rather than reducing it.
Probabilistic early expiry. Each read may decide to refresh the value before it expires, with probability rising as expiry approaches. Refreshes spread out naturally and no key ever hard-expires under load.
Jittered TTLs. Keys written together must not expire together — which is what happens after any cache warm-up or mass invalidation.
The related failure is a cold cache under load: nothing is cached, everything misses, the database cannot keep up, so nothing completes and the cache never fills. That one is not solved by coalescing alone; it needs warming or load shedding during recovery.