PrepZone Logo
PrepZone
Back to Database

Database · Hard

How do you make database writes idempotent when clients and queues retry?

DatabaseTransactionsStaffDistributed Systems

Answer preview

A write is idempotent when applying it once and applying it ten times leave the database in the same state. Because every real network, client retry and message broker delivers at-least-once, idempotency is what turns duplicate delivery from a correctness bug into a harmless no-o…