Problem
When a dependency is failing, every client retrying each failed call multiplies load, and layered retries across tiers multiply it again. The extra load prevents the dependency from recovering.
Also known as: retry-throttling, retry-ratio-limit
Limit retries to a fixed fraction of normal traffic so retries help with transient errors but cannot amplify an outage.
When a dependency is failing, every client retrying each failed call multiplies load, and layered retries across tiers multiply it again. The extra load prevents the dependency from recovering.
A retry budget answers the question that per-request retry counts cannot, namely how much extra load retries are allowed to add in total. Envoy and gRPC both ship the idea as configuration.
Maintain a token bucket per destination. Successful calls deposit a fraction of a token, and each retry withdraws a whole one.
ratio = 0.1
on success: tokens = min(max, tokens + ratio)
on failure:
if tokens >= 1 then tokens -= 1; retry
else fail fast
With a ratio of 0.1, retries can never exceed ten percent of successful traffic in steady state. During a full outage the bucket drains and retries stop, so the client falls back to a single attempt per request. A small minimum allowance keeps low-traffic clients functional.
None, client-side counter
Low, monitor budget exhaustion
Low, simple concept
Budget too small turns brief blips into user-visible errors
Retries at multiple layers each with own budget still compound
Budget shared across unrelated endpoints starves a healthy one