Protocols
Saved & recent

Idempotency

Also called: idempotent operation, idempotent methods

An operation is idempotent when repeating the same request has the same intended effect as performing it once. In HTTP, safe methods, PUT and DELETE have this property by definition. It does not require identical responses, identical logs, or an unchanged world between attempts.

For example, setting a note’s title to “Network notes” twice leaves that title in place. Appending another copy of a note twice may create two copies. Idempotency helps recover from an unknown outcome after a connection failure; retries still need sensible limits and must respect the actual operation’s contract.

Read first
HTTP methods
Related
Safe HTTP methods, Idempotency key, Retry backoff and jitter
Further reading
set title to “Network notes” Network notes repeat operation Network notes after one application after two applications append a “Network notes” note Network notes repeat operation Network notes Network notes after one application after two applications
Setting the same title once or twice has the same intended final effect. This illustrative append operation adds another copy each time. Idempotency concerns effects, not identical response codes.

View in the full Protocols collection