Skip to content
GGleamInsight
Wiki

Retries and Backoff

A retry repeats an operation after a failure. Backoff delays subsequent attempts, while a retry budget limits how much extra work is allowed. Safe use depends on the operation’s semantics and the reason for failure.

Published 2 min readUpdated

Definition

A retry repeats an operation after a failure. Backoff delays subsequent attempts, while a retry budget limits how much extra work is allowed. Safe use depends on the operation’s semantics and the reason for failure.

A missing response leaves uncertainty

If a connection closes before a response arrives, the server may still have processed the request. RFC 9110 distinguishes idempotent methods because repeating their intended action has the same effect as performing it once. Repeating a non-idempotent operation can create unintended duplicate effects.

For example, retrying an authorized read after a transient connection failure differs from retrying a transaction creation whose outcome is unknown. For the latter, first use the application’s supported outcome lookup or documented idempotency mechanism. Do not invent a header and assume the server honors it.

Match the response to the action

A proxy 407 calls for authentication inspection, not an endless retry loop. A 403 is an access refusal. A 429 asks the client to slow down and may provide Retry-After. Transient gateway or network failures may justify bounded retries if the operation is safe to repeat.

A hypothetical backoff sequence might wait progressively longer between attempts, but no universal delay schedule is correct for every service. Follow the destination’s guidance and include all attempts in the authorized workload budget.

Bound work and measure outcomes

Set a maximum attempt count and an overall task deadline. Preserve enough context to identify which logical operation each attempt belongs to. Record both per-attempt results and whether the original task ultimately completed correctly.

Backoff reduces immediate pressure; it does not repair invalid credentials, missing permission, or an incompatible proxy protocol. Stop repeated attempts when the evidence points to a configuration or policy problem that requires a different action.

Sources

Sources checked on November 18, 2026. Examples are illustrative, not measurements of a live proxy service.

Frequently asked questions

Does a timeout prove the server did nothing?

No. The server may have processed the request before the response was lost or delayed.

Can every POST be retried safely?

No. Use the application’s documented idempotency or outcome-checking mechanism when available.

What should I do with Retry-After?

Respect the server’s stated wait and applicable policy before another attempt, if retrying remains appropriate.

Do retries count toward load?

Yes. They are additional attempts and should be included in request-rate and resource budgets.

Should I retry an unchanged 407 indefinitely?

No. Inspect and correct proxy authentication instead of repeatedly sending the same failing configuration.