Set a Retry Budget: Limit Aggregate Retries to Contain Failures
A retry budget caps the volume of repeated requests so retries do not overwhelm original traffic. A per-request attempt limit prevents one request from retrying forever, but cannot stop thousands of requests from each retrying. Design both a per-request cap and a client- or service-wide budget.
A retry budget caps the volume of repeated requests so retries do not overwhelm original traffic. A per-request attempt limit prevents one request from retrying forever, but cannot stop thousands of requests from each retrying. Design both a per-request cap and a client- or service-wide budget.
Two kinds of limits
**Per-request attempt limit:** the total attempts allowed for one logical request. State whether “4 attempts” means one initial call plus 3 retries.
**Shared retry budget:** the retries allowed across a client or process over time, or in proportion to successful requests. When depleted, keep sending initial requests but stop retries or fail them quickly.
Choose scope deliberately. A process budget controls one instance, but total allowance may grow as instances scale. A service-wide budget can constrain broader retry storms, but shared coordination can add latency or become a failure point. An SDK's internal token bucket protects that client implementation; do not assume it is a service-wide budget.
Choose and connect the budget
**Narrow retryable errors.** Allow only errors that may recover, such as transient failures or throttling; exclude permanent errors. Check idempotency or deduplication too.
**Choose a denominator.** A fixed retries-per-time interval is simple but may be too strict or generous as traffic changes. A ratio of retries to successful initial requests scales with normal traffic. For example, allow `r × S` retries for `S` successful initial requests. Choose `r` from observed rejection cost and recovery behavior; there is no universal value.
**Also enforce per-request caps and deadlines.** An available shared budget does not override an attempt limit or remaining deadline. Retries at several service layers can multiply, so let one layer immediately above the rejecting dependency own them.
**Define exhaustion behavior.** Continue normal first attempts but stop additional retries promptly. Return a clear overload result so another layer does not retry again, and distinguish it from permanent errors.
Google SRE gives 60 retries per minute per process as an illustrative server-wide budget, not a default. Its client-side example separately uses a per-request attempt cap and a retry-ratio limit. Current AWS SDK documentation describes an SDK-internal token bucket that spends tokens on retries, replenishes them on success, and stops retries—but not initial requests—when empty. These values and semantics are specific to the documented SDK and mode; verify your installed version.
What to monitor
Compare retry-to-initial-request ratio, remaining budget, blocked retries, final errors, success rate, and latency in normal conditions and transient failures. Check whether one failing dependency or tenant can exhaust budget needed by other work. Confirm that SDK and application limits neither conflict nor duplicate. Test recovery after budget depletion. No SDK or service load test was performed here.
Sources
[Google SRE Book: Addressing Cascading Failures — Retries](https://sre.google/sre-book/addressing-cascading-failures/)
[Google SRE Book: Handling Overload — Client Side Throttling](https://sre.google/sre-book/handling-overload/)
[AWS SDKs and Tools: Retry behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html)