ExitExponential Backoff: bounded retry timing1 / 9
Explanationassociate9 steps · 4 exercises

Give a dependency time to recover

How capped, jittered delays give a dependency time to recover after transient failures, and how to keep those delays within the retry budget of the caller, workflow, or event source that owns the retry.

Exponential backoff increases the delay before successive retries, giving a temporarily overloaded or unavailable dependency time to recover. Start with an initial delay, multiply it for each successive retry, and apply a maximum delay. For example, starting at 200 milliseconds and doubling with a 500-millisecond cap gives delay ceilings of 200, 400, 500, 500, and so on. The cap limits one wait, not the total time spent retrying.

If many callers fail together, even a growing delay can make them retry together. Full jitter picks a random wait between zero and the capped ceiling for each retry. Backoff grows the ceiling, the cap keeps it from growing indefinitely, and jitter spreads the actual attempts across time. The next ceiling is based on the schedule, not on the last randomly chosen wait.

Next up: Sort the statements on what you just read.