Skip to content
← Notes

Note ·

On idempotency in distributed systems

Idempotency is the cheapest insurance you can buy for a distributed system. Every external write, whether a payment, email, or webhook, should accept an idempotency key. Every retry should reuse it.

When clients can't generate a stable key, generate one server-side from the request shape and a short window. Worse than a duplicate is a duplicate you can't explain.

Keep reading ↗