Architecture Deep Dive

Idempotency — Safe Retries

Networks fail. Your client can't tell if a request succeeded or just timed out. Idempotency solves this: the same request can be safely executed multiple times without duplicate side effects. Use idempotency keys to track retries.

Idempotency KeysDuplicate DetectionDeduplication LedgerRetry SafetyExactly-Once Semantics
← Back to Architecture
The Problem

The Retry Dilemma

Client calls an API to transfer $100. Server processes it but response is lost. Client retries. Now $200 is transferred. This is disaster for money, and for any operation with side effects.

  • Network failures: timeouts, lost packets, dropped connections.
  • Client retry logic: without idempotency, retries cause duplicates.
  • Exactly-once semantics: hard to achieve in distributed systems.