← 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.

Read what people asked

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.

Named in the answersValkeyPydanticOpenAIAnthropic

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.

Show 2 more

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.

Goes straight to the person who runs this site. No account needed.