Design Jittered Retries: Spread Out Retry Storms
A jittered retry adds randomness to a retry delay so clients that experience the same failure do not all send again at the same moment. Exponential backoff alone can leave retry calls clustered; jitter spreads them across a bounded window. Still limit retryable errors, attempts, deadlines, and duplicate effects separately.
A jittered retry adds randomness to a retry delay so clients that experience the same failure do not all send again at the same moment. Exponential backoff alone can leave retry calls clustered; jitter spreads them across a bounded window. Still limit retryable errors, attempts, deadlines, and duplicate effects separately.
Full-jitter calculation
First calculate window = min(cap, base × 2^n), where n = 0 for the first retry. Then choose the actual wait uniformly from U(0, window). U(a, b) means a uniform random value between a and b.
With an illustrative base of 200 ms and a cap of 2 seconds, waits are sampled from 0–200 ms, then 0–400 ms, then 0–800 ms. Clients that failed together are spread across each window instead of retrying at one fixed instant. These values are an example, not a universal recommendation.
Why add jitter, and which kind?
Exponential delays reduce retry frequency, but deterministic delays can make clients fail at similar times and retry in clusters. AWS describes this effect in an optimistic concurrency control simulation and shows that jitter spreads calls over time. Those results belong to that model; they do not guarantee the same improvement for every service.
**Full jitter:** choose randomly from zero to the current capped window. It is simple and appears in SDK documentation.
**Equal jitter:** keep part of the window as a minimum wait and randomize the rest. It can avoid very short waits, but is not always better than full jitter.
**Decorrelated jitter:** use the previous random delay when calculating the next window. Its timing and total request volume can differ, so compare it under representative conditions.
Start by checking the standard retry behavior of your SDK. Adding custom jitter on top of SDK retries can increase actual calls unexpectedly. Do not retry permanent errors. During overload, also consider retry budgets or server-provided retry guidance.
How to verify
In a test environment, make many clients receive the same error at once. Compare retry-time distribution, total calls, success rate, completion time, and server load. Confirm random waits stay within the configured window, maximum delay, and overall deadline. Shared fixed seeds or centralized random state can undermine dispersion. Test retryable-error and idempotency rules too; do not experiment with unlimited retries on production traffic. No simulation or API load test was run here.
Sources
[AWS Architecture Blog: Exponential Backoff and Jitter](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/)
[Google SRE Book: Addressing Cascading Failures — Retries](https://sre.google/sre-book/addressing-cascading-failures/)
[AWS SDKs and Tools: Retry behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html)