Coordination & Transactions

Lesson, slides, and applied problem sets.

View Slides

Lesson

Coordination & Transactions

Why coordination

Distributed systems need coordination for correctness: locks, leases, consensus, and transactions for multi-step workflows.


2PC vs Saga

  • Two-Phase Commit (2PC): atomic but can block
  • Saga: break a transaction into steps with compensations

What you will build

  • Determine saga compensations after a failure
  • Decide 2PC outcome from participant votes
  • Enforce fencing tokens for stale leaders

Module Items