Curriculum · Module 05, Consensus and Coordination
Raft consensus
Elections, terms, log replication and the commit rule. Watch a cluster keep one consistent log through crashes and partitions.
What each topic covers
- A replicated log needs every node to apply the same entries in the same order, through crashes, partitions and nodes that only think they are in charge.
- How a follower becomes a leader, how a write becomes committed, and the three rules that keep every log the same.
- Crash nodes, cut the network, submit writes, and watch terms, votes and commit indexes hold the log together.
- Measured elections and partitions, the split-vote cost of tight timeouts, and what the model leaves out.
- A worked repair of a follower that holds the wrong entries, the AppendEntries back-off step by step, and why the old-term commit rule exists.
- Why swapping the whole configuration at once can elect two leaders, how joint consensus and one-at-a-time changes avoid it, and why new servers join as learners.
- Three quick checks on one leader per term, the election restriction and a cluster without a majority, plus the papers behind the lesson.
Topics
Practise this lesson
13 interview questions on raft and consensus, with worked answers and sources.
Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms