Build fluency in the vocabulary of electing a leader and replicating a log to a majority for a understandable consensus protocol.
0 / 5 completed
1 / 5
A teammate explains that a cluster elects a single leader via randomized election timeouts, and that leader replicates a log of commands to followers, only considering an entry committed once a majority of nodes have durably stored it. What consensus algorithm is being described?
Raft consensus is exactly this: nodes use randomized election timeouts to elect a single leader, that leader appends commands to a replicated log and sends them to followers, and an entry is only considered committed once a majority of nodes have durably stored it, giving the cluster a single, well-defined source of truth even as leaders come and go. A DNS zone transfer is an unrelated concept about replicating name server records. This elect-a-leader-then-replicate-to-majority approach is exactly why Raft was designed to be an understandable alternative to Paxos for building replicated logs.
2 / 5
During a design review, the team adopts Raft for a configuration store that must keep serving consistent reads and writes even if the current leader crashes, specifically because a new leader is elected automatically and the committed log survives the transition. Which capability does this provide?
Raft here provides automatic leader failover with no loss of committed entries, since a majority-committed entry survives any single leader crash and a new leader is elected to continue replication without operator intervention. Manually restarting the crashed leader and waiting for it specifically to come back before serving any request would leave the configuration store unavailable for however long that restart takes. This automatic-election-with-durable-commits behavior is exactly why Raft is favored for configuration stores that must tolerate leader crashes.
3 / 5
In a code review, a dev notices a configuration store designates one fixed node as the permanent leader with no election mechanism, and the store becomes fully unavailable whenever that specific node crashes, instead of using Raft's automatic leader election. What does this represent?
This is a missed Raft-consensus opportunity, since automatic leader election would let a new leader take over instead of the whole store becoming unavailable when the fixed leader crashes. A cache eviction policy is an unrelated concept about discarded cache entries. This fixed-permanent-leader pattern is exactly the kind of single point of failure a reviewer flags once automatic failover is required.
4 / 5
An incident report shows a configuration store was fully unavailable for twenty minutes because its one designated leader node crashed and there was no election mechanism to promote a replacement until an operator manually intervened. What practice would prevent this?
Adopting Raft consensus lets a new leader be automatically elected by the remaining majority of nodes within seconds of the previous leader crashing, instead of waiting for manual intervention. Continuing to designate one fixed leader node with no election mechanism regardless of how long manual intervention takes after it crashes is exactly what caused the twenty-minute outage described in this incident. This automatic-majority-election approach is the standard fix once fixed, unelected leaders are confirmed to cause extended outages on crash.
5 / 5
During a PR review, a teammate asks why the team reaches for Raft instead of Paxos, given that Paxos was the original consensus algorithm and is more widely cited in academic literature. What is the reasoning?
Raft was explicitly designed to decompose leader election, log replication, and safety into separately understandable pieces, making it easier to implement correctly, while Paxos provides equivalent guarantees but is notoriously difficult to implement correctly from its original formulation. This is exactly why Raft is favored by teams building a new replicated log from scratch, while Paxos and its variants remain common in systems that predate Raft's publication or that need Paxos's more flexible quorum configurations.