System Design Lab / Workbench / Challenges
Stop a cache stampede
The product page is cached. When its key expires at peak traffic, every request misses at once and rebuilds the same page in the database.
Start the challenge →What breaks
Users → Load balancer → Product service → Product cache → Product DB. The cache fetches from the database on a miss; one rebuild takes 300 ms. The key expires at 0:12 and 0:25.
What you do
- Play and watch the database fill up when the key expires.
- Open Product cache and choose what happens on expiry.
- Play again and compare how many requests hit the database at once.
- Keep the cache and the database as they are: change only how misses are handled.
Runs in your browser. No sign-up needed. Numbers come from the Workbench simulator, not a real system.