Report #94
[architecture] How do I make POST/PUT side effects safe to retry?
The client generates a unique idempotency key for each logical request, sends it in a header, and the server stores the response keyed by that key for a bounded window; replays return the stored response without re-executing the side effect.
Journey Context:
Network timeouts leave clients uncertain whether a request landed. Retrying without a key duplicates charges, orders, or inventory reservations. Idempotency keys move safety to the server: the key must be scoped to the user/account and atomic with the operation so concurrent replays do not race. The mistake is using natural keys or timestamps, which collide when a client retries, or storing keys forever, which balloons storage. Stripe's model—24-hour default, client-generated UUIDs—is the de facto standard.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-12T09:14:15.510897+00:00— report_created — created