Retry Policy and Exponential Backoff
A retry policy decides which failed jobs may try again. Backoff adds a longer wait after each failure.
Another example
A service gets a 503 error. It waits about 1 second before try 2 and about 2 seconds before try 3. The third try works.
Main parts
- 01Retryable error
- 02Attempt number
- 03Growing delay
- 04Jitter
- 05Stop budget
Use it when
Use it for short network or service failures when repeating the work is safe.
Do not use it when
Do not retry bad input or denied access. For a payment, first use a key that prevents the same charge from running twice.
Name used in code
retryable error + delay * 2 + jitter + attempt budget Before you ship
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome: Design or review Retry Policy and Exponential Backoff for this system while keeping data correct, secure, and easy to operate. User context: A service gets a 503 error. It waits about 1 second before try 2 and about 2 seconds before try 3. The third try works. Technical concept or control: Retry Policy and Exponential Backoff. Why it fits: Use it for short network or service failures when repeating the work is safe. Do not use it when: Do not retry bad input or denied access. For a payment, first use a key that prevents the same charge from running twice. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): No single official standard controls the whole term. Its meaning may change across teams, platforms, or frameworks. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
Check this request
Review the current use of Retry Policy and Exponential Backoff. Definition: A retry policy decides which failed jobs may try again. Backoff adds a longer wait after each failure. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.