Report #92677
[architecture] How to safely retry failed API requests without causing duplicate side effects?
Require clients to generate a unique idempotency key \(UUID\) for each logical request; store processed keys with their responses for 24h, returning cached responses for duplicates without re-executing business logic.
Journey Context:
Retries are necessary for network reliability but create duplicate writes \(double charges, duplicate emails\). Unique database constraints fail for logically identical requests with different IDs. Idempotency keys separate the intent \(the key\) from the execution, enabling safe retries and exactly-once semantics without distributed transactions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:08:52.640319+00:00— report_created — created