System Designcalculator

Retry backoff planner

Retries turn a brief failure into a success, and a long one into more load on a service that is already struggling. This calculator shows both sides: how long a caller can end up waiting, and how many calls land on the failing service.

Worst case

A call can take 6.5 s before it gives up, and all 5 attempts fail 0.032% of the time.

Load in an outage5×5 attempts per call on the failing service

1,000 clients hit a 3 s outage

02505007501,0000 ms2 s4 s6 sTime since the outage startedRetries per 50 msOutage ends
NoneFullEqualDecorrelated

Retry policy

Jitter

Growth of the ceiling per retry. Decorrelated jitter grows by up to 3× instead.

No single sleep is longer than this.

Total calls, including the first.

Treated as independent between attempts. Real failures are often correlated.

Services in the call chain that each retry on their own.

Worst-case time6.5 sEvery attempt times out after the longest sleep
All attempts fail0.032%20% per attempt
Expected attempts1.25Per call, including the first

What it shows

A retry helps when a failure is brief. When an outage is long, every retry is extra load on a service that is already struggling. Jitter adds randomness to each wait, so clients that failed together do not all retry together.

The tool shows how long a caller can wait and how many calls reach the failing service. It also simulates many clients in one outage, once per jitter mode, with the same random seed.

How to read it

  • The schedule lists each attempt: the range its sleep is drawn from, the average sleep, and the latest it can start.
  • Worst-case time is the longest a caller waits before it gets an answer or gives up.
  • Expected attempts treat each attempt as an independent coin flip. Real failures are often correlated, and in an outage every attempt fails.
  • Load in an outage is attempts raised to the number of layers that retry.
  • A tall, narrow spike in the chart is a retry storm. Jitter flattens it.
  • The table counts the biggest retry burst, total attempts, clients that gave up and when the last client got through.

Questions

Which jitter mode should I use?

In Marc Brooker’s 2015 simulation on the AWS Architecture Blog, every jittered version did far less work than plain exponential backoff. Full jitter used the least work; decorrelated jitter finished slightly sooner but made more calls; equal jitter did a little more work than full jitter and took much longer.

Why is retrying at every layer a problem?

Each layer multiplies the attempts of the layer above it. Google’s SRE book gives the example of three layers that each make up to four attempts: one failing request becomes 64 attempts on the bottom service. It recommends limiting retries per request and using a server-wide retry budget; the Amazon Builders’ Library recommends retrying at a single point in the stack.

What is decorrelated jitter?

Instead of drawing each sleep from a range set by the attempt number, it draws from between the base delay and three times the previous sleep, capped at the maximum. Sleeps grow by up to 3× per retry whatever the multiplier, which is why its schedule is wider and its averages are estimated from samples.

Is it safe to retry any request?

Only if repeating it does no harm. A retried read is harmless, but a retried payment or insert can happen twice if the first attempt succeeded and only the response was lost. Make writes idempotent, for example with an idempotency key, before you retry them.

Why do some clients give up sooner with jitter?

Jitter shortens the average sleep, so with the same number of attempts a client spends less total time retrying. If the outage outlasts that time, more jittered clients use every attempt before the service recovers. Raise the cap or the attempt count, or accept failing fast.

Learn it properly

Sources

Explore further

  • TenacityPython retry library with exponential backoff and jitter built in.

Last updated

More tools

All tools

Your first senior-level
lesson is free.

Choose a course, open a free lesson, and explore an idea you’ve wanted to understand.