All practice problems Bug of the Day: a new problem every midnight, free for everyone. Keep a streak with your friends.
DevOps Engineering · Production incident · Hard
Production incident practice: Cache Stampede
Redis restarted for a routine upgrade. The database did not enjoy it. Ten minutes ago Redis was restarted for a planned upgrade. Since then the database…
The problem
- CRITICAL · orders-db · CPU 100% — api p99 9.4s
- Ten minutes ago Redis was restarted for a planned upgrade. Since then the database is pinned at 100% and the site crawls. Calm the herd — and make sure it can't happen again in five minutes.
You'll use: Linux shell · kubectl · curl · Logs & metrics · Rollbacks
Solve it (expert level)2–4 min · Type commands (or tap them)
Show a hint
Compare cache stats with db top-queries. Where are the reads going?
What this teaches (spoiler)
A cold or synchronised cache sends the whole herd to the database. Pre-warm hot keys after restarts, add jitter to expiry times, and let one request rebuild a key while others wait.