opyebAPI Bench

Retry storms: how a 1% error becomes 300% load

Reliability · 7 min read

Every retry is a second request that the server did not plan for. When a dependency slows down, clients retry, the extra load makes it slower, and the loop feeds itself. This is the retry storm, and the arithmetic behind it is simple enough to do before the incident.

The amplification formula

If each attempt fails with probability f and a client makes up to n retries, the expected number of attempts per logical request is the geometric sum 1 + f + f² + … + fn. At a one percent failure rate with two retries that is 1.0101, about a one percent load increase. Nothing to worry about. At twenty percent with five retries it is 1.249, and if the sentinel shares the same failure, the whole fleet retries at once.

Formula: attempts = (1 − fn+1) ÷ (1 − f). Effective arrival rate = target rps × attempts. Include this figure in every capacity plan that has retries enabled.
Failure rateRetriesAttempts per requestLoad at 1,000 rps
1%21.011,010 rps
5%31.161,158 rps
20%51.251,249 rps
50%51.971,969 rps

Why the cliff is worse than the formula

The geometric sum assumes failures are independent. In a real outage they are not: every client sees the same slow dependency at the same moment, retries synchronise, and the effective failure rate during the retry burst is far above the steady-state value. That is how a partial degradation turns into a total outage within seconds.

Three mechanisms cause most of the damage. Immediate retries with no delay create a spike at the worst possible moment. Unbounded retries keep a request alive long after the caller has given up. Retrying non-idempotent operations duplicates side effects, so the system is now wrong as well as slow.

Design rules that hold up

  • Retry only idempotent operations, or make them idempotent with a request key.
  • Cap retries at two or three and cap the total time budget, not just the attempt count.
  • Add exponential backoff with jitter so the fleet does not retry in lockstep.
  • Respect Retry-After from 429 and 503 responses instead of guessing.
  • Shed load at the edge when the failure rate crosses a threshold, rather than amplifying it.
  • Give each dependency a retry budget — a percentage of total requests — and stop when it is spent.

Measuring it before it happens

The capacity calculator on this site takes the failure rate and retry count as inputs and returns the effective arrival rate. Run it with your current numbers and again with a plausible degraded value. If the difference is larger than your spare capacity, you do not have retries; you have an amplifier with no gain control.

What a good retry looks like in practice

A well-behaved client retries a small number of times, waits with jitter, honours the server's guidance, and gives up inside a deadline the caller can tolerate. That combination keeps a transient failure transient. The same client, with no jitter and no cap, turns a ten-second blip into a ten-minute outage because the retry traffic arrives exactly when the service is trying to recover.

Server-side controls matter as much as client behaviour. A service that returns 503 with a Retry-After, sheds a fraction of requests when its queue passes a threshold, and publishes a retry budget gives clients something to cooperate with. A service that returns 500 for overload and accepts everything invites the opposite.

  • Return 503 with Retry-After instead of 500 when you are deliberately overloaded.
  • Reject early at the edge rather than letting work pile up inside.
  • Alert on retry rate, not only on error rate; the retry rate moves first.

During an incident, the fastest way to break the loop is usually to stop retrying at the client, not to add capacity at the server. Capacity takes minutes to arrive; a retry switch takes seconds.

Open the calculators and put these numbers to work on your own API.

Open API Bench

Frequently asked questions

Is three retries too many?

It is reasonable for idempotent reads with backoff and a total deadline. Beyond three attempts the marginal success rate is small while the load and tail latency keep growing, so the extra retry mostly extends the outage.

What is a retry budget?

A cap on retries as a fraction of normal traffic, for example ten percent. Once the budget is exhausted, clients stop retrying and fail fast, which keeps the dependency from being overwhelmed by its own callers.

Should I retry a 500 response?

Only if the operation is idempotent and you have evidence that the error is transient. A 500 can mean the work partially happened, so retrying a write may duplicate it. 502, 503 and 504 are usually safer candidates.

Sources

Related guides