The Desi Architect
Notes / Messaging and Correctness / Distributed Transactions and Sagas
Track 4 · Messaging and Correctness

Distributed Transactions and Sagas

One business action, three databases, and no single COMMIT that covers them. This page shows how two-phase commit and sagas each handle that, what each one breaks, and how to pick.

Guide20 min read
On this page
  1. The checkout that charged and did not order
  2. The simple version
  3. Why three calls in a row are not safe
  4. Two-phase commit, the strict answer
  5. Sagas, the loose answer
  6. Walking through a failure
  7. War room: the double refund
  8. Which one do I use?
  9. Traps I see again and again