Consensus & Leader Election (Raft, Leases, Fencing)

System Design · Advanced: Distributed Systems Deep Dive · Advanced · 25 min

Explain how a cluster agrees on one leader and one history even when machines crash and messages get lost: Raft terms, votes and quorum commits, plus leases and fencing tokens for everything else.

This lesson is part of TuringPath Pro. See plans.

What you will learn

  • Why agreeing is hard
  • Raft in four moves: terms, votes, logs, commits
  • Leases and fencing tokens
  • Use it, don't build it

More in Advanced: Distributed Systems Deep Dive

Previous: LLD: Design Movie Ticket Booking (BookMyShow) · Next: Distributed Transactions: 2PC, Sagas & the Outbox