Quick Answer
Cache stampede (thundering herd): when a cache key expires and many requests simultaneously go to the database. Prevention: probabilistic early expiration (start refreshing before it expires), soft expiration (serve stale while refreshing in background), cache locking (only one request fetches; others wait for the lock), or pre-computation (scheduled refresh before expiry).
Answer
Prevent stampede using locks, request coalescing, stale responses, or probabilistic expirations.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.