Interview Prep/SRE & Reliability/Release Engineering & Reliability Patterns

What is idempotency and why does it matter for reliability?

AdvancedConceptRelease Engineering & Reliability Patterns
Answer

An idempotent operation produces the same result when applied once or several times. It makes retries safe: retrying PUT /orders/123 or a DELETE is harmless, but retrying a POST /payments could charge twice. For non-idempotent writes, clients send an idempotency key (for example a UUID in an Idempotency-Key header) and the server stores the result per key, returning the stored result for duplicates. Message consumers need the same property, because most queues guarantee at-least-once delivery.

All SRE & Reliability questions

More on Release Engineering & Reliability Patterns