← All questionsToo earlyArchitecture and design
Where should retries and idempotency keys live?
You are not the only one. Asked 6 times since July 2026, 4 of them in the last 4 weeks.
Times asked per week
9 Sept – 1 Dec
Week of 9 SeptTimes asked0Week of 16 SeptTimes asked0Week of 23 SeptTimes asked0Week of 30 SeptTimes asked0Week of 7 OctTimes asked0Week of 14 OctTimes asked0Week of 21 OctTimes asked0Week of 28 OctTimes asked01Week of 4 NovTimes asked1Week of 11 NovTimes asked01Week of 18 NovTimes asked12Week of 25 NovTimes asked2
Week of 9 SeptWeek of 25 Nov
Coloured columns are the last 4 weeks.
What people answer
- Some sayThe backend must enforce idempotency, because disabling buttons or showing spinners in the UI cannot stop duplicates from refreshes, extra tabs, or automatic retries.
- Some sayGive each intended user action its own unique identity (an idempotency key) so the server can recognize a repeat of the same request and not run it twice.
- Some sayA timeout or missing response does not mean the operation failed, so the server may have already succeeded and retries must be safe.
- One saysMove slow or flaky downstream work, such as LLM calls, into queue-backed workers with exponential backoff, so retries resume from saved intermediate state and don't rerun the whole pipeline.
- One saysValidate outputs against strict schemas to stop retry loops caused by malformed model responses, which saves cost.
ValkeyPydanticOpenAIAnthropic
A language model summarised 3 public replies and posts. They mostly agree. These are other people's views, not advice from Navigara.
What people asked
Each line is our one-sentence summary. The link opens the original discussion.
- How should an order API handle duplicate or retried requests so that a customer does not end up with two orders?Open thread →
- How can an LLM wrapper application stop wasting money on redundant full-context API calls and retries after transient timeouts?Open thread →
- How should a web or mobile application behave when the same action, such as a booking request, arrives more than once, and how do idempotency keys prevent duplicate operations?Open thread →
Show 2 more
- How should a client store and reuse the same idempotency key across retried requests so that a repeated payment click does not create a second payment?Open thread →
- Where should orchestration logic such as retries, idempotency and routing live relative to a clean single-action primitive interface for an external service?Open thread →
Where it is asked
- dev.to3
- Stack Exchange2
- A private community1
Private messages are counted, never shown. That is why you can read 5 of them.