All challenges
Multiple ChoiceHard 45s

Cache stampede / thundering herd

A popular key with a 60s TTL expires during peak traffic. Thousands of concurrent requests miss and all hit the DB. Which mitigation is most targeted?
Options
  1. 1Use a per-key mutex or single-flight so only one request recomputes while others wait for the result
  2. 2Increase the DB connection pool size so the database can absorb all the concurrent cache-miss queries without queueing
  3. 3Disable TTLs entirely and rely purely on LRU eviction, so curated hot keys never expire and never trigger a stampede
  4. 4Replicate the database to add read capacity, so the extra replicas collectively absorb the burst of cache-miss lookups

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle