api: YAML JSON TOON Database version: 1.0.0 format: json dataset: id: 1003 slug: http-request-retry-decisions title: HTTP Retry Decision Reference description: "Failure scenarios and retry decisions for HTTP clients, including idempotency, backoff, deadlines, and ambiguous writes." summary: "Failure scenarios and retry decisions for HTTP clients, including idempotency, backoff, deadlines, and ambiguous writes. Each row includes a practical application and a failure to check before using it." use_when[2]: Implement a client that survives transient failures.,Distinguish safe retries from duplicated writes. caveats[2]: Status alone cannot prove a write was not applied.,An idempotency key works only if the server defines and enforces it. related[2]: http-server-error-guide,http-conditional-requests category: HTTP Status Codes category_slug: http-status-codes tags: "http-status-codes,http request retry decisions,reference,engineering" view_count: 0 created_at: 1791798640 updated_at: 1791798640 reviewed_at: 2026-10-12 sources[2]{title,url}: IETF HTTP semantics,"https://httpwg.org/specs/rfc9110.html" AWS retry and jitter guidance,"https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/" reading[1]: api-retries-with-backoff-and-idempotency provenance: "Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses." entry_count: 12 fields[4]{section,field,type,example}: data,scenario,string,GET times out data,decision,string,Usually retry within a budget data,action,string,Back off with jitter and a total deadline. data,risk,string,Repeated attempts still increase server load. data[12]{scenario,decision,action,risk}: GET times out,Usually retry within a budget,Back off with jitter and a total deadline.,Repeated attempts still increase server load. POST times out after sending,Do not blindly retry,Reconcile by operation ID or use documented idempotency support.,The server may have committed the first request. 429 Too Many Requests,Retry only after waiting,Honor Retry-After and cap the attempt count.,Immediate retries amplify throttling. 503 Service Unavailable,Potentially retry,Respect Retry-After when present and use jitter.,A prolonged outage can exhaust client resources. 502 Bad Gateway,Potentially retry,Retry only when the operation is safe to repeat.,The upstream may already have processed a write. 400 Bad Request,Fix the request,Inspect validation errors and send a corrected request.,Repeating identical input wastes the budget. 401 Unauthorized,Refresh credentials if supported,"Refresh once, then fail clearly if still unauthorized.",An unbounded refresh loop hides real auth problems. 403 Forbidden,Do not automatically retry,Check the policy and caller permissions.,New attempts do not grant authorization. 404 Not Found,Usually stop,Check the identifier; retry only for documented eventual creation.,A missing resource is not a transient transport failure. 409 Conflict,Reconcile first,Reload state and apply the domain-specific conflict policy.,Blind retries can repeat a logically invalid operation. 412 Precondition Failed,Reload and reconsider,Fetch the new revision before attempting an edit.,Replacing the validator defeats concurrency protection. Connection refused,Bounded retry if appropriate,Use a small retry budget and report the endpoint.,Permanent configuration errors do not heal with backoff.