Flowcharts & Processes

Two-Phase Commit: Atomic Distributed Systems

Flowcharts & Algorithms diagram · made in Skemio

Flowchart of 2PC protocol showing coordinator broadcast of PREPARE, cohort vote gathering, unanimous check, and commit or abort branching.
Flowchart of 2PC protocol showing coordinator broadcast of PREPARE, cohort vote gathering, unanimous check, and commit or abort branching.

What it shows

  • Phase 1 asks all participants to prepare and vote before mutating.
  • A single 'No' vote or timeout triggers an immediate global rollback.
  • Phase 2 locks changes permanently only if 100% of nodes vote Yes.

The takeaway

2PC guarantees atomicity across distributed nodes by isolating agreement from actual execution.

More flowcharts & algorithms diagrams