Idempotence

/ˌaɪdɛmˈpoʊtəns/i·dem·po·tencenoun
API Design Core

Definition

1.[in computing] the property of an operation whose repeated application produces the same result as a single application, so a retry cannot cause additional change.

Because the endpoint has idempotence, the client can safely retry after a timeout.

Formal statement

f(f(x)) = f(x)

Applying the operation twice leaves the state it produced untouched.

Etymology

From Latin idem 'the same' plus potens 'having power'. Coined by Benjamin Peirce in 1870 for algebraic elements unchanged by self-multiplication; carried into computing for operations safe to retry.

Synonyms

  • retry-safesense 1 · Near

Antonyms

  • stateful mutationsense 1 · Relational

References