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
- Why consensus — and why it is hard
- Raft leader election: terms, votes and randomised timeouts
- Raft log replication, commit index and safety
- Paxos intuition and how the protocols compare
- Using etcd and ZooKeeper in practice
- Leases and fencing tokens: making leader election actually safe
- Failure detectors: heartbeats, timeouts and phi accrual
- Split brain: causes and prevention
- Physical time: NTP skew, clock jumps and TrueTime
- Logical clocks: Lamport, vector clocks and hybrid logical clocks
Previous: CAP, PACELC & Consistency Models · Next: Idempotency, Distributed Transactions, 2PC & Sagas