The Retry Storm – senior-level system design challenge

Your database is about to slow down by 400 ms. Your clients retry failures up to three times. Keep the API standing.

Requirements

Goal

Hold p99 latency under 1,000ms, error rate under 0.5% through every stage of the test plan, then compare your design with a reference design.

The test plan

  1. Normal: 3,000 requests per second.
  2. Database slows down: 3,000 requests per second.

Hint

A slow database doesn't use API CPU - it holds API threads while requests wait. Once threads run out, requests fail, clients retry, and the retries add even more load. Stop requests waiting on the database: a cache answers most of them without touching it.

Solve it on the live simulator, free and in your browser.

More system design challenges