Suggest an editImprove this articleRefine the answer for “What is idempotency and why is it needed?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Idempotency** is a property of an operation in which repeating it produces the same result as the first execution: the system stays in the same state without duplication or errors. **Key point:** it is a key principle of reliable microservices, where retries can happen due to network errors or message redelivery.Shown above the full answer for quick recall.Answer (EN)Image**Idempotency** is a property of an operation in which **repeating it produces the same result** as the first execution. In other words, if the same request runs twice (or more), the system stays in the same state, without duplication or errors. ### Examples of idempotency - **Money transfer:** a repeated request should not deduct the amount again. - **HTTP PUT:** updating the resource `/user/1` with the same data always produces the same result. - **Sending an event:** redelivery should not create a duplicate order or notification. ### Why idempotency is needed 1. **Reliability in distributed systems**: during failures or retries, the system does not lose consistency. 2. **Safe repeated calls**: especially important for microservices and message brokers, where the same event can arrive several times. 3. **Resilience to network errors**: on timeouts, an operation can be retried without the risk of a "repeated action". ### How it is achieved - Using **unique operation identifiers**. - Checking the state before executing ("if already processed, skip"). - Logging all processed events or transactions. **Summary:** > **Idempotency** guarantees that a repeated call does not change the result. > It is a key principle of reliable microservices, where retries can happen due to network errors or message redelivery.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.