Skip to content

Exponential backoff

Exponential backoff multiplies the waiting interval between retries, up to a configured limit.

APIs and data contracts

Exponential backoff increases the wait between retries by a factor, usually up to a cap. After a temporary failure, the application therefore does not immediately send the same request again. Backoff is an interval rule within a retry strategy.

Define waiting intervals and stopping rules separately

A fictional API example starts with a one-second wait after a failed attempt, doubles it and caps it at four seconds: 1 → 2 → 4 → 4 s. These are illustrative base intervals without jitter, not recommended operating values. Jitter adds random variation to the actual wait to keep many clients from retrying at the same time.

The cap does not stop retries. The attempt limit, overall time budget and eligible errors must be defined separately. Waiting longer does not make an invalid request valid; an operation with possible side effects must be safe to repeat.

If the client library already retries, another loop in the application can multiply the number of calls. The team therefore needs to consider both layers together.

Sources