What is the "thundering herd" problem in the context of database connection and cache management, and how is it typically mitigated?
Correct! Well done.
Incorrect.
The correct answer is C) It happens when a popular cached value expires and many requests simultaneously hit the database to recompute it, overwhelming it — mitigated via request coalescing, regeneration locks, or staggered expiry times
Correct Answer
It happens when a popular cached value expires and many requests simultaneously hit the database to recompute it, overwhelming it — mitigated via request coalescing, regeneration locks, or staggered expiry times
When a hot cache entry expires, every waiting request can fall through to the database at once, causing a load spike. Common mitigations include having only one request regenerate the value while others wait (request coalescing/locking), serving slightly stale data while refreshing, and jittering expiration times so entries don't all expire together.