Idempotency¶
Category: Distributed systems · Status: stub
One line: An operation that has the same effect whether it runs once or several times, which is what makes retrying after a timeout safe.
Also called: idempotent.
How it connects¶
flowchart LR
n_durable_execution["Durable execution"]
n_idempotency["Idempotency"]
n_durable_execution -->|uses| n_idempotency
classDef center stroke-width:3px
class n_idempotency center
classDef outside stroke-dasharray: 4 3
class n_durable_execution outside
- Is used by: Durable execution
- See also: Partial failure
In each language¶
| Elsewhere | HTTP: the safe methods, PUT and DELETE are idempotent ↗, POST and PATCH are not guaranteed to be; APIs such as Stripe's ↗ take an idempotency key so that a retried request is safe |
Where to read more¶
- In this library: When does order change a sum?
- In the books: Concurrency in Go, Katherine Cox-Buday — ch. 5, 'Concurrency at Scale' → 'Replicated Requests'
- In the books: Async Rust, Maxwell Flitton, Caroline Morton — ch. 9, 'Design Patterns' → 'The Retry Pattern'
- In the books: Distributed Systems with Node.js, Thomas Hunter II — ch. 8, 'Resilience' → 'Idempotency and Messaging Resilience'
- Notes: idempotency ↗
- Reference: Wikipedia: Idempotence (computer science meaning) ↗