ATRIUMsearch → argument graph
Article · 2026-07-30 · 2 moments

A Detailed Guide to Idempotency, Delivery Semantics, and Deduplication

What happens when a service sends a request to charge a customer, but the request times out with no response? ✦ AI generated

01
Definition

An operation is idempotent when applying it more than once produces the same state as applying it once, which is the property that makes retries safe.

Idempotency ensures retrying an operation doesn't change the final state beyond the first successful application. The author contrasts setting a fixed value (idempotent) with incrementing a value (not idempotent), and notes most business-critical operations resemble the latter.

transcript

the author: Idempotency is the property that makes the retry safe. An operation is idempotent when applying it more than once produces the same state as applying it once. For example, setting an account balance to 500 is idempotent, because even the tenth time to execute this operation, the outcome will be the same. In contrast, adding 500 to a balance is not idempotent, since every time it is executed, the balance amount changes. Most operations that matter in a business system resemble the second one.

gives example · 2

02
Fact

Retrying a timed-out payment request risks charging the customer twice, but declining to retry risks never charging them at all.

When a payment request times out, both the success-with-lost-confirmation and failure-to-reach scenarios produce identical outputs. This creates a dilemma: retrying risks a double charge, but not retrying risks no charge at all.

transcript

the author: What happens when a service sends a request to charge a customer, but the request times out with no response? The burning question is whether the charge went through. Or should it be retried? Two different things could have happened. The charge succeeded, and the confirmation was lost on the way back, or the request never reached the payment service at all. Both possibilities produce identical outputs, which makes it difficult to figure out what happened and the next action to be taken. Retrying risks charging the customer twice. On the other hand, declining to retry risks never charging them at all.

explains mechanism · 1

Highlight slides
Related episodes