Consensus, Leader Election & Time

How machines agree when networks lie and clocks drift: Raft in detail, Paxos intuition, etcd/ZooKeeper in practice, leases with fencing tokens, failure detectors, split brain, NTP vs TrueTime, and Lamport/vector/hybrid logical clocks.

About 95 minutes · 15 exam questions · 9 interview questions · 2 code labs

What you will learn

  1. Why consensus — and why it is hard
  2. Raft leader election: terms, votes and randomised timeouts
  3. Raft log replication, commit index and safety
  4. Paxos intuition and how the protocols compare
  5. Using etcd and ZooKeeper in practice
  6. Leases and fencing tokens: making leader election actually safe
  7. Failure detectors: heartbeats, timeouts and phi accrual
  8. Split brain: causes and prevention
  9. Physical time: NTP skew, clock jumps and TrueTime
  10. Logical clocks: Lamport, vector clocks and hybrid logical clocks

Previous: CAP, PACELC & Consistency Models · Next: Idempotency, Distributed Transactions, 2PC & Sagas