Knowledge Maxxing
← Back to topic library
Dev MaxxingAdvancedDistributed Systems90 sec

Idempotency

Idempotency is a property of an operation where running it multiple times has the same effect as running it once, even if it's accidentally repeated.

Prerequisite: Message queue

What matters

In distributed systems, messages or requests can sometimes be delivered more than once; idempotent operations make that safe, since repeating them doesn't cause duplicate side effects.

Example

An operation that sets 'status = paid' is idempotent, since running it twice leaves the same result, unlike an operation that increments a counter by one each time it runs.

Common misconception

Idempotency does not mean an operation can only be run once; it means running it more than once causes no additional unwanted effect beyond the first time.

Recall question

Why does idempotency matter for operations in a system where messages can be delivered more than once?

Keywords and related concepts

idempotencyduplicate deliverydistributed systemsmessage queue

Related topics

Message queue
Dev MaxxingAdvanced
Database transaction
Dev MaxxingIntermediate