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.
A call can take 6.5 s before it gives up, and all 5 attempts fail 0.032% of the time.
1,000 clients hit a 3 s outage
Retry policy
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.
| Attempt | Sleep before | Average sleep | Latest start |
|---|---|---|---|
| 1 (first call) | None | None | 0 ms |
| 2 | 0 ms to 100 ms | 50 ms | 1.1 s |
| 3 | 0 ms to 200 ms | 100 ms | 2.3 s |
| 4 | 0 ms to 400 ms | 200 ms | 3.7 s |
| 5 | 0 ms to 800 ms | 400 ms | 5.5 s |
| Jitter | Biggest retry burst | Total attempts | Gave up | Last client through |
|---|---|---|---|---|
| None | 1,000 | 4,000 | 0 | 3.7 s |
| FullSelected | 523 | 4,000 | 0 | 3.68 s |
| Equal | 1,000 | 4,000 | 0 | 3.69 s |
| Decorrelated | 259 | 3,968 | 0 | 5.94 s |
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- estimatorBack-of-envelope estimatorTurn daily users into requests per second, storage and bandwidth, with the working shown.Open tool
- simulatorConsistent hashing simulatorA hash ring with virtual nodes: key spread per node, and how many keys move when the cluster changes.Open tool
- estimatorQueue latency estimatorWhy latency explodes as servers get busy: utilisation, waiting time and Little’s law.Open tool