1. Retry_Patterns_and_Idempotency_Keys
Retry Patterns and Idempotency Keys
An idempotency key turns "retry on failure" from a hazard into a guarantee.
Key Takeaways
- Retries are mandatory; duplicates are the cost
- An idempotency key is a unique ID per logical operation
- The server stores the first response and replays it on duplicates
- Combine idempotency with backoff and a circuit breaker
The Bug
Your payment service calls the bank. The card is charged, but the response times out. The client retries. The card is charged again. The customer is double-billed.
The network is unreliable. Retries are mandatory. But retries duplicate work.
The Pattern
The c
1m / Article + audio + video