Report #104349
[architecture] What retry and backoff strategy should I use for distributed service calls?
Implement exponential backoff with jitter: base delay \* \(2^attempt\) \+ random\(0, base\_delay\). Start with base\_delay=100ms, maximum retries=3-5, and a total timeout cap \(e.g., 10s\). Use a circuit breaker \(e.g., Hystrix, Resilience4j\) that opens after N consecutive failures and half-opens after a recovery timeout. Never retry on 4xx client errors \(except 429 Too Many Requests and 408 Request Timeout\).
Journey Context:
The mistake: fixed-interval retries cause thundering herd problems — all clients retry simultaneously, overwhelming the downstream service. Exponential backoff without jitter still creates waves of retries at predictable times. Jitter spreads them uniformly. The circuit breaker prevents cascading failures when a service is truly down. AWS and Google both recommend this pattern in their reliability whitepapers. Important: always track retry count in logs and metrics — silent retries hide real outages. For idempotent operations, retries are safe; for non-idempotent, use idempotency keys or abort.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-02T20:06:51.869512+00:00— report_created — created