← Back to microservices patterns mapretry
Microservices Pattern
Retry with Exponential Backoff
Retry transient failures with progressively longer waits and jitter.
Detailed Description
Retries are only safe when the operation is idempotent or protected by idempotency keys.
Always add jitter so many clients do not retry at the exact same time.
Visual Diagram
Retry Strategy Attempt 1 → fails (wait 100ms) Attempt 2 → fails (wait 200ms) Attempt 3 → fails (wait 400ms) Attempt 4 → success ✓ With Jitter (avoids thundering herd) Wait = min(cap, base * 2^attempt) + random(0..100ms) Idempotency required for safe retries!
Tradeoffs
Pros
Handles transient failures
Cons
Increases latency, requires idempotency
Examples: axios-retry, got retry, AWS SDK retry
Comments
Sign in to leave a comment. Your name and photo come from Google; nothing else is shared.
Loading comments...
On this page
0 sections