Two-Phase Commit Distributed Transaction Flow
UML Sequence Diagrams · made in Skemio

What it shows
- Phase 1 (Prepare): Coordinator asks nodes to lock records and vote.
- Phase 2 (Commit): Coordinator issues commit only if all votes are YES.
- Coordinator failure while locks are held blocks the entire cluster.
The takeaway
2PC guarantees atomic consistency across nodes, but trades off availability and latency.
- #TwoPhaseCommit
- #DistributedSystems
- #Database
- #SystemDesign
- #Consensus





