Why distributed transactions don't scale
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
explain why two-phase commit is avoided across services.
Planned topics
- Two-phase commit (2PC): a coordinator asks all participants to prepare, then to commit.
- Participants hold locks while waiting; a coordinator crash leaves them blocked.
- Availability is the product of all participants' availability, and latency is the slowest one.
- Services own separate databases and brokers; many do not support 2PC at all.
- The alternative is a series of local transactions with explicit recovery.
Draft outline details
Demonstration
a diagram: coordinator, inventory, payments, locks held across a network round trip.
Check your understanding
What happens to participants if the 2PC coordinator dies after prepare?
Show answer
They stay blocked holding locks.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.