Skip to content
Latchkey

What Is Idempotency?

Idempotency is the property that performing an operation multiple times has the same effect as performing it once. Applying the same deploy, API call, or infrastructure change repeatedly converges on the same state rather than compounding. This makes retries, reruns, and crash recovery safe.

Why it matters

Distributed systems retry constantly because networks fail. If operations are not idempotent, a retry can double-charge, double-deploy, or corrupt state. Designing for idempotency, often with deduplication keys, is what makes retry-with-backoff and at-least-once delivery tolerable.

Related concepts

  • Required for safe retry-with-backoff
  • Declarative infrastructure aims to be idempotent by design
  • Idempotency keys deduplicate repeated requests

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →