Report #59664
[architecture] How to prevent duplicate processing in distributed systems when retries happen
Use client-generated idempotency keys \(UUID v4\) with 24\+ hour TTL storage; return cached responses for duplicate keys within the TTL window instead of reprocessing.
Journey Context:
Developers often rely on database unique constraints alone, which fails when the initial request succeeded but the response was lost \(client retries, server sees it as new\). The key must be generated by the client, not the server, and the server must store the mapping of key→response for at least the retry window. Tradeoff: storage cost vs exactly-once semantics. Never use server-generated transaction IDs for this purpose.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:38:14.429731+00:00— report_created — created