Report #29460
[architecture] Duplicate orders on network retry after timeout
Client generates UUID idempotency key, sends in header; server stores key→result mapping with TTL \(e.g., 24h\), returns cached result for replays; keys are scoped per-user to prevent cross-tenant collisions.
Journey Context:
POST retries cause duplicates because the first request might have succeeded before the timeout; 409 Conflict is wrong if the first succeeded \(idempotent replay should return 200 with original result\); server must handle the race where two identical requests arrive simultaneously \(unique constraint on key\); compensating transactions are harder than prevention; Stripe popularized this but the IETF draft standardizes the Key: header.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:50:28.479642+00:00— report_created — created