Exponential Backoff Calculator

← All tools

Set a base delay, a multiplier, and a cap. The table is the wait before each retry, with or without jitter.

The schedule is calculated in your browser. Nothing is uploaded. The numbers are stored in the URL. A pasted log is not.

Jitter

First wait

Base, multiplier, cap, attempts, jitter, the first-wait choice, and the seed are stored in the URL. The seed is used only when jitter is on. Decorrelated jitter ignores the multiplier.

No schedule

Wait before each retry

AttemptRetryWaitCumulativeCap

About this tool

The uncapped wait is base times multiplier to the power of the attempt number, then cut at the cap. With "Equals the base delay", the attempt starts at 0, and multiplier to the power 0 is 1, so the first wait is the base delay. The sample is a base of 1000 ms, a multiplier of 2, a cap of 30000 ms, and 4 attempts: 1000, 2000, 4000, then 8000 ms.

"Equals base times the multiplier" starts the attempt at 1. The first wait is base times the multiplier. That is the AWS Architecture Blog simulator: pow(2, n) * base, and n is incremented before the first sleep, so the first n is 1. The simulator hardcodes 2. This page uses the multiplier you type. The source is Marc Brooker's "Exponential Backoff And Jitter" (4 March 2015) and backoff_simulator.py in aws-samples/aws-arch-backoff-simulator.

Full jitter draws a wait from 0 up to that capped exponential, using a half-open range. Equal jitter keeps half of it and draws the other half at random. Decorrelated jitter draws between the base delay and three times the previous wait, then applies the cap. The previous wait starts as the base delay. The multiplier does not enter that formula. The draws use mulberry32 and the seed, so the same seed repeats on this page. They are not Python's random.uniform, and they are not the retry schedule of a particular SDK. Each jittered wait is rounded to 0.001 ms, and the cumulative column adds those rounded waits. Up to 15 attempts.

Read more

Free books, courses, and software

Get my programming books, course editions, and complete software.

Get the download library →