Daeseon Yoo

Wiki

Idempotent

Applying an operation N times lands in the same state as applying it once. The principle that makes retries safe — and the truth behind 'exactly-once'.

·principle · distributed-systems · api · reliability

Instances

The principle

An operation is idempotent if running it N times converges to the same state as running it once. It's not about avoiding side effects — it's about the side effect being repeatable without accumulating. DELETE /users/42 is idempotent; a naive POST /orders is not.

How it maps to practice

The reason it matters: networks retry. A client that loses the response can't tell failure from success, so it resends. Idempotency is what makes that resend safe instead of a double-charge.

How it gets buried

"Exactly-once delivery!" sold as a property of a broker. It isn't — delivery is at-least-once, and processing is made idempotent. The buzzword hides where the work actually happens (your consumer).

Say it clearly

"Run it twice, same result. So we can retry safely." If a race-condition can let two first-time requests both slip through the dedup check, the key alone isn't enough — you need a distributed-lock or a unique constraint.

In Korean

"멱등(冪等)" — a math loanword ("same under repeated exponentiation"). Accurate but opaque; most people meet it as jargon and unpack it once. English idempotent (idem = same) wears its meaning on the surface.