API Reliability

API Retry and Exponential Backoff Guide

Design API retries with exponential backoff, jitter, attempt limits and idempotency boundaries instead of multiplying an outage. Last updated September 16, 2026.

Design API retries with exponential backoff, jitter, attempt limits and idempotency boundaries instead of multiplying an outage. This reference is written for developers who need practical validation behavior, reviewable rules and safe examples rather than copied snippets with no explanation.

Recommended workflow

StepWhy it matters
Classify the failureRetry connection resets, selected timeouts and documented 429 or 5xx responses, not every error.
Protect writesUse idempotency keys or operation identifiers before retrying create and payment requests.
Add jitterRandomized delay prevents many clients from retrying at the same instant.
Stop predictablySet attempt, elapsed-time and caller-deadline limits.

Starter snippet

delay = min(cap, base * 2^attempt) + random_jitter
retry only transient failures

Review checks

Common mistakes

Validation should help users correct input while protecting systems from bad data. Keep syntax checks, product policy, security review and deliverability checks separate.

Related Formalint references

Continue with Api Idempotency Retry Guide, Api Timeout Debugging Guide, Api Rate Limit Debugging.