Cianplan

Level 2: Data · L2.4 Transactions & isolation

Two-phase commit and why services avoid it

Explain 2PC and its blocking/availability cost.

11 min · Pro

What you take away

  • Phase one asks every participant to durably promise it can commit; phase two tells them all what to do.

And 3 more inside the class, in Pro.

How the class is laid out

  1. The problem
  2. The simple version
  3. The protocol, and its cost
  4. What to do instead
  5. ACID
  6. Anomalies
  7. MVCC
  8. Concurrency control
  9. 2PC
  10. Check your understanding