Report #104677
[architecture] Retry and backoff design for distributed systems
Use exponential backoff with jitter, capped at a maximum delay \(e.g., 30 seconds\). Implement at most 3-5 retries, then fail into a dead-letter queue. Always randomize \(jitter\) to avoid thundering herd. For safety-critical operations, add a circuit breaker that stops retries after N consecutive failures, with a half-open state for recovery. Never retry on 4xx \(client error\) except 429 \(rate limit\) or 409 \(conflict\). Always retry on 5xx \(server error\) and network timeouts.
Journey Context:
Naive exponential backoff without jitter causes 'retry storm' — all clients retry simultaneously at fixed intervals, crashing the server. AWS and Google publish standard formulas using full jitter \(random between 0 and current delay\). Common mistake: unlimited retries — they mask permanent failures and exhaust resources. Another pitfall: treating 401/403 as retryable \(they never succeed\). Circuit breaker pattern \(from Michael Nygard's 'Release It\!'\) prevents cascade failures. For queues, use visibility timeout plus retry policy instead of client-side retries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-27T20:05:50.064586+00:00— report_created — created