Subtracks & Tasks
Raft Leader Election
Implement Node States (Leader, Follower, Candidate)
Implement the three states from Raft: Leader, Follower, and Candidate. Each node starts as a Follower. Candidates request votes. Leaders coordinate th...
Add Heartbeat Mechanism
Implement heartbeats from the leader to followers. The leader periodically sends AppendEntries (empty for now) to maintain authority. Followers that d...
Implement Randomized Election Timeout
Add randomized election timeouts. When a follower does not hear from a leader within its timeout, it becomes a candidate. Randomization helps prevent ...
Handle RequestVote RPC
Implement the RequestVote RPC. Candidates request votes from other nodes. Nodes grant their vote if the candidate's term is current and they have not ...
Prevent Split Votes Through Term Management
Handle split votes where no candidate receives a majority. Candidates increment their term and retry. Proper term management ensures the cluster event...
Interview Prep
Common interview questions for Distributed Systems / Infrastructure Engineer roles that map directly to what you build in this track. Click any question to reveal the model answer.
Questions are representative of real interview patterns. Model answers are starting points ā adapt them with your own experience and the specific context of the interview.
Common Mistakes
The top 5 mistakes builders make in this track ā and exactly how to fix them. Click any mistake to see the root cause and the correct approach.
Comparison Mode
Side-by-side comparisons of the approaches, algorithms, and trade-offs you encounter in this track. Expand any comparison to see a detailed breakdown.
Concepts Covered
Prerequisites
It is recommended to complete the previous tracks before starting this one. Concepts build progressively throughout the curriculum.
Rabbit Holes
For when you want to go deeper. Curated papers, posts, and talks beyond what this track covers.
In Search of an Understandable Consensus Algorithm (Raft)
Ongaro and Ousterhout, 2014. Read the paper after you've implemented a working version. The gap between "I read this" and "I built this and now I re-read this" is enormous.
The Raft Visualization
The canonical interactive visualization of Raft leader election and log replication. Run a network partition and watch what happens. This is the fastest way to build intuition.
Diego Ongaro's PhD Dissertation (Full Raft Spec)
The dissertation is longer than the paper and contains the formal correctness proofs, the full TLA+ specification, and corner cases the paper glosses over. Chapter 9 on cluster membership changes is essential if you ever need to add or remove nodes live.
Raft Does Not Guarantee Liveness in the Face of Network Faults
An underappreciated result: Raft can livelock under certain network conditions that are theoretically possible. Understanding this is what separates a Raft implementer from a Raft expert.