What is Idempotency?
A property where performing an operation multiple times produces the same result as performing it once.
An idempotent operation can be safely retried without unintended side effects. In HTTP, GET, PUT, and DELETE are idempotent by design — sending the same request twice should produce the same outcome. POST is not inherently idempotent.
Idempotency is crucial for reliable systems. If a network timeout occurs during a payment, retrying an idempotent request will not charge the customer twice. Implementation techniques include idempotency keys, database upserts, and conditional operations.