Thundering herd.
also: cache stampede · cache stampedes · dog-pile · dogpile · stampedeMany requests at once hitting a missing or expired cache entry and all going to the database together, overwhelming it.
the two-minute refresher
- Black Friday, 6 a.m.: the doors open and 5,000 people rush in at once.
- Triggers: a popular key expiring, a cold cache after deploy, many keys sharing one TTL.
- Defences: a lock (one fetcher), request coalescing, early probabilistic refresh, background refresh, stale-while-revalidate.
- Same shape elsewhere: clients retrying in sync after an outage.