Monoliths and Microservices

Module 5

Distributed Transactions

What you lose the moment state spans two services, why two-phase commit is usually the wrong answer, and the two primitives every distributed write depends on.

32 min2 lessons
Start module

What you will be able to do

  • Explain what atomicity across services costs and why two-phase commit is rarely chosen.
  • Design a business flow that tolerates partial completion.
  • Apply the transactional outbox to make a state change and a message atomic.
  • Make a consumer idempotent and explain why at-least-once delivery makes it mandatory.
  • Communicate eventual consistency to product stakeholders in terms they can decide on.
  1. 01What You Lose, and Why 2PC Is Not the Answer

    The single most under-estimated consequence of splitting a system: the atomic commit that made hundreds of operations correct without anyone thinking about it.

  2. 02The Outbox and Idempotency

    Two primitives that every distributed write depends on: making a state change and its message atomic, and making a repeated message harmless.

Distributed Transactions

6 questions · pass at 75%