Two-Phase Commit Explained in 5 Minutes

Опубликовано: 15 Май 2026
на канале: Vincent Nyanga
95
7

Two-Phase Commit (2PC) is one of the oldest and most important protocols in distributed computing. In this video, I walk through how it works, where it's used, and its fundamental trade-off.

We cover three scenarios:

Happy path — all participants agree, transaction commits
Participant votes NO — one node rejects, everything rolls back
Coordinator crashes — the blocking problem that's baked into the math
2PC powers ATM networks, airline booking systems, distributed databases like Google Spanner and CockroachDB, and enterprise platforms worldwide. It's 47 years old and still foundational.

Interactive simulator and source code: https://github.com/vince-nyanga/two-p....