What is idempotency?
An operation is idempotent when repeating the same operation has the same intended effect as performing it once. Idempotency is especially important when clients or distributed systems retry requests. For operations such as payments or resource creation, an idempotency key can help the server recognize duplicate attempts and prevent unintended duplicate effects.
Key Takeaways
- Idempotency matters when retries are possible.
- Idempotency keys are useful for sensitive operations.
- Design retry behavior together with idempotency.
Knowledge Check
Why are idempotency keys useful for APIs?