1. One leader speaks for the group
Clients send writes to the leader. Followers mostly copy what the leader says. This keeps ordering simple.
Guided Subpage
This page is designed for people who are new to Raft and for people who need the deeper details. Click through guided scenes to see heartbeats, elections, quorum, commit rules, partition recovery, and how YugabyteDB uses many Raft groups at the tablet level.
The goal here is to make the protocol feel human: one leader at a time, majority agreement before commit, and fast failover without corrupting history.
Raft In One Minute
Clients send writes to the leader. Followers mostly copy what the leader says. This keeps ordering simple.
An entry is not safely committed just because one machine wrote it. It becomes committed only after a majority agrees.
If followers stop hearing from the leader, one starts an election. The cluster picks a new leader and continues.
If a server sees a higher term, it steps down. This is one of the key reasons Raft avoids split-brain commits.
The replicated log is the ordered history of decisions. Every healthy node should converge to the same committed log.
YugabyteDB does not use one cluster-wide Raft leader. Each tablet has its own Raft leader, so work spreads across the cluster.
Guided Flow
Each scene has a simple explanation, a more technical explanation, and the operational lesson to remember. The details here were re-checked against the Raft project site, the Raft algorithm summary on Wikipedia, and YugabyteDB documentation.
Scene 1
Plain English: if the current leader goes quiet for too long, one follower says, “I think the leader is gone. Let’s vote for a new one.”
A follower stops hearing heartbeats within its randomized election timeout, increments the term, votes for itself, and becomes a candidate.
The follower starts a new election because it no longer trusts that a current leader is alive.
Fast leader replacement improves availability, but the random timeout reduces the chance that everyone starts an election at the same moment.
Randomized election timeout helps resolve split votes and stabilize leader selection.
Simple Mental Model
The leader is the current coordinator. It receives requests, writes them to the shared history, and asks others to confirm.
Followers are the witnesses. They copy the leader’s history and can quickly take over if the leader disappears.
A majority is the “enough people agree” rule. If most of the group has confirmed an entry, a future leader will preserve it.
How To Use This
Use the scenes to narrate exactly how a follower becomes candidate, how quorum works, and why stale leaders cannot safely continue writing.
Pause on scene 4 to talk through minority partitions, stale leaders, and why Raft chooses safety over write availability without quorum.
Use scene 5 to explain that the database scales through many tablet Raft groups and leader balancing rather than a single global leader.
Common Confusions
An entry can exist on several nodes and still not be safely committed. Commitment requires Raft’s quorum rules.
During a partition, two nodes may both think they are leader. The key safety point is that conflicting commits still require a majority, so the minority side cannot safely finalize writes.
Raft handles crashes, restarts, and message delays, but it assumes the participating servers are not malicious.
Verification Notes
Verified facts used here include: Raft is designed for understandability, progress depends on a majority, leaders are elected after missed heartbeats, voters grant one vote per term, candidates need up-to-date logs, joint consensus is used for safe membership changes, log compaction uses snapshots, and YugabyteDB applies Raft per tablet rather than one global cluster log.