Retry with exponential backoff and jitter
Retrying a failed call after waits that grow each time, with some randomness added so many clients do not retry at the same moment.
Many failures are brief: a timeout, a restart, a rate limit. Retrying at once hammers a service that is already struggling; waiting 1, 2, 4, 8 seconds gives it room, and random jitter spreads clients out so they do not return in waves (thundering herd). Every call also needs a timeout, or there is nothing to retry. Retry only operations that are idempotent or carry an idempotency key.
Related terms
- Idempotency (idempotency key): An operation is idempotent if doing it twice has the same effect as doing it once. Retries become safe.
- Thundering herd: Many clients or processes hitting one resource at the same moment, for example right after an outage ends or a popular cache entry expires.
- Circuit breaker: A guard around calls to a dependency that stops calling it after repeated failures and fails fast until it recovers.
