Skip to content

PAPER EXPLAINED

In Search of an Understandable Consensus Algorithm

IntermediateAbout 50 min to read the paper

TL;DR

Raft is a consensus algorithm for managing a replicated log that the authors designed to be easier to understand than Paxos. It splits consensus into leader election, log replication, and safety, and a user study suggests students learn it more easily.

What problem does Raft solve?

Many reliable systems need a group of servers to agree on an identical, ordered log of commands, even when some servers crash or messages are lost. Paxos dominated this area, but the authors argue it is notoriously hard to understand. It also lacks a widely agreed, complete description for multi-decision logs. As a result, real implementations drift far from the published algorithm and its proofs. The difficulty lies in staying correct under crashes, network delays, and leader changes while keeping the design simple enough to reason about.

The core idea

Elect one strong leader and give it full responsibility for the log. Entries flow only from the leader to followers. The authors divided the problem into pieces that can each be understood on their own: electing a leader, replicating entries, and keeping things safe across leader changes. They also shrank the number of states to reason about, for example by not allowing holes in logs and by limiting how logs can diverge. Randomization is used where it simplifies matters, notably in elections.

IN THE AUTHORS’ WORDS

“It was important not just for the algorithm to work, but for it to be obvious why it works.”

In Search of an Understandable Consensus Algorithm, p. 2

“Raft ensures that there is at most one leader in a given term.”

In Search of an Understandable Consensus Algorithm, p. 6

“Raft never commits log entries from previous terms by counting replicas.”

In Search of an Understandable Consensus Algorithm, p. 9

How Raft works

  1. Time is divided into numbered terms that act as a logical clock. Each server is a follower, a candidate, or a leader. A server that sees a higher term updates its own term and steps down to follower.
  2. If a follower hears nothing from a leader within its randomized election timeout, it becomes a candidate. It then increments its term, votes for itself, and requests votes. Winning a majority makes it leader, and it sends heartbeats to prevent new elections.
  3. The leader appends each client command to its log and replicates it with AppendEntries. Each AppendEntries includes the index and term of the preceding entry. A follower rejects new entries unless it has a matching entry there, and the leader backs up nextIndex until the logs agree.
  4. Voters deny their vote to a candidate whose log is less up-to-date, judged by the last entry's term and then by log length. Since any winner needs a majority, the elected leader already holds every committed entry.
  5. A leader commits only entries from its current term by counting replicas on a majority. Earlier entries are committed indirectly. This avoids a case where an old-term entry on a majority could still be overwritten.
  6. To change cluster membership, the leader first commits a joint configuration. While it is in effect, decisions need separate majorities of the old and new server sets. Only after that does the leader commit the new configuration, so two leaders are never possible in the same term.

Results

User study: 43 students learned both Raft and Paxos, and 33 scored higher on Raft. Mean scores out of 60 were 25.7 for Raft versus 20.8 for Paxos. 33 of 41 respondents felt Raft would be easier to implement and to explain, though the authors note these self-reports may be biased. Correctness: a TLA+ specification of about 400 lines, a mechanically checked proof of one property (which relies on unchecked invariants), and an informal proof of State Machine Safety. Performance: on a five-server cluster, elections without randomness often took over 10 seconds. Adding 5ms of randomness gave a median downtime of 287ms, and 12-24ms timeouts averaged 35ms. The authors still recommend conservative 150-300ms timeouts.

Limitations and what came later

  • Client interaction (including linearizable semantics) and log compaction via snapshots are omitted from this version and deferred to an extended report.
  • The model assumes non-Byzantine failures: servers fail by stopping and may recover from stable storage.
  • Availability depends on timing; elections only work well if broadcast time is much smaller than the election timeout, which is much smaller than the mean time between failures.
  • The mechanical proof covers one property and relies on invariants that were not mechanically checked. The State Machine Safety proof is informal.
  • The performance evaluation focuses on leader election. Optimizations such as batching and pipelining are mentioned but left to future work. The user study's survey answers may reflect participants' knowledge of the authors' hypothesis.

Why Raft matters

Consensus underpins services that store configuration and coordinate leaders in large systems. The paper argues that an algorithm developers cannot understand will be hard to implement correctly, because real implementations inevitably extend the published form. By giving a complete, compact description and treating understandability as a goal on par with correctness and efficiency, Raft offers both a teaching tool and a practical blueprint. The paper notes it already had several open-source implementations and company deployments.

This is the paper that introduced Raft, a consensus algorithm built with understandability as its main design goal. It addresses a problem that sits under many reliable systems: keeping a replicated log identical across machines when some of them crash. Raft splits the problem into leader election, log replication, and safety. A one-page summary (Figure 2) is complete enough to guide an implementation, and a short proof sketch explains why the rules are safe. The paper also explains its design choices, for example why it dropped a ranking scheme for elections in favor of randomized timeouts. It backs its understandability claim with a user study comparing Raft and Paxos, rather than relying only on assertion. If you want to see how a fault-tolerant replicated log can be reasoned about step by step, this is a clear and practical place to start.

Before you read

Who it’s for

Students and engineers who want to understand how replicated logs and leader-based consensus work. It especially suits people who have found Paxos hard to follow, or who plan to implement or debug a system that relies on a consensus algorithm.

What to know first

  • Basic distributed systems ideas: servers, messages, crashes, network partitions
  • What a remote procedure call (RPC) is
  • The idea of a majority (quorum) of servers
  • Comfort following an informal proof by contradiction
  • Helpful but optional: a rough sense of what Paxos tries to do

Glossary

Replicated state machine
A set of servers that each run the same deterministic state machine on the same sequence of logged commands, so they compute identical state and keep working if some servers fail.
Term
A numbered period of time in Raft that begins with an election and has at most one leader. Terms act as a logical clock for detecting stale information.
Election timeout
How long a follower waits without hearing from a leader before starting an election. Raft picks it randomly from an interval to avoid split votes.
AppendEntries RPC
The message a leader uses to replicate log entries to followers. When it carries no entries, it serves as a heartbeat.
RequestVote RPC
The message a candidate sends to gather votes. It includes information about the candidate's last log entry so voters can apply the election restriction.
Committed entry
A log entry that is safe to apply to state machines. Raft guarantees committed entries are durable and will eventually be executed by all available state machines.
Log Matching Property
If two logs contain an entry with the same index and term, the logs are identical in all entries up through that index.
Leader Completeness Property
If an entry is committed in some term, it will be present in the logs of the leaders of all later terms.
Joint consensus
A transitional configuration used during membership changes. Elections and commitment require separate majorities from both the old and the new server sets.

What to pay attention to

  • Figure 2 on page 5 is the whole core algorithm on one page; reread it after each section.
  • Why randomized election timeouts make split votes rare, and why the authors preferred this to a ranking scheme (page 7).
  • How the AppendEntries consistency check works like an induction step that keeps logs matching (page 8).
  • The election restriction: a voter refuses a candidate whose log is less up-to-date (page 9).
  • Figure 8: why an entry from an older term can sit on a majority of servers and still be overwritten (page 9).
  • Joint consensus requires separate majorities of the old and new configurations during membership changes (page 11).
  • The timing requirement broadcastTime ≪ electionTimeout ≪ MTBF, and the claim that safety does not depend on timing (pages 10-11).

You can skip it if… Skip it if you only need a high-level sense that consensus lets a majority of servers agree, or if your interest is Byzantine (malicious) faults, which the paper does not address. Also skip it if you need details on client interaction or log compaction, since these are deferred to an extended version.

Questions to keep in mind

  • Why does Raft let a new leader only count replicas for entries from its own current term when deciding commitment?
  • How does comparing the term and index of the last log entry guarantee that an elected leader holds every committed entry?
  • What could go wrong if servers switched directly from the old cluster configuration to the new one?
  • Which parts of Raft depend on timing for availability, and why does safety not depend on timing?
  • How convincing is the user study as evidence of understandability, given the biases the authors themselves acknowledge?

Raft quiz: check your understanding

1. What three states can a Raft server be in, and what does each do?

Show the answer

A server is a leader, a follower, or a candidate. The leader handles all client requests and replicates log entries. Followers are passive: they only respond to requests from leaders and candidates. A candidate is a server trying to become the new leader during an election.

2. How does Raft make split votes rare and resolve them quickly?

Show the answer

Each server picks its election timeout randomly from a fixed interval, such as 150-300ms. Usually one server times out first, wins, and sends heartbeats before others time out. After a split vote, each candidate restarts with a new random timeout, which lowers the chance of another split.

3. When is a log entry considered committed in Raft?

Show the answer

An entry is committed once the leader that created it has replicated it on a majority of servers. Committing it also commits all earlier entries in the leader's log. However, a leader only commits by counting replicas for entries from its own current term. Older entries become committed indirectly through the Log Matching Property.

4. How does a voter decide whether a candidate's log is at least as up-to-date as its own?

Show the answer

It compares the last entries of the two logs. If their terms differ, the log whose last entry has the later term is more up-to-date. If the terms are the same, the longer log is more up-to-date. The voter denies its vote if its own log is more up-to-date.

5. How does a new leader bring an inconsistent follower log back in line?

Show the answer

The leader keeps a nextIndex for each follower, starting just past the end of its own log. If AppendEntries fails the consistency check, the leader decrements nextIndex and retries until the logs agree. The follower then deletes its conflicting entries and appends the leader's entries.

6. What did the user study find?

Show the answer

The study involved 43 students at Stanford and Berkeley. 33 scored higher on the Raft quiz than on the Paxos quiz. The mean scores out of 60 were 25.7 for Raft and 20.8 for Paxos. A paired t-test indicated, with 95% confidence, that the true Raft mean is at least 2.5 points higher.

7. Why are servers told to ignore some RequestVote RPCs during membership changes?

Show the answer

Servers removed from the new configuration stop receiving heartbeats. They time out and send RequestVote RPCs with higher terms, which can repeatedly depose the leader. To prevent this, a server ignores a RequestVote it receives within the minimum election timeout of hearing from a current leader.

Your answers stay on this page and are cleared when you leave.

Go a little deeper

Raft ensures safety by restricting who can be elected, rather than by transferring missing entries to a new leader as Viewstamped Replication does. What does this choice gain in simplicity? What might it cost, for example in which servers can become leader or how long elections take after failures?

Read next

More papers on Consensus.

Related reading lists

All papers explained →

Cite Raft

Ongaro, D., & Ousterhout, J. (2014). In Search of an Understandable Consensus Algorithm. USENIX ATC.

@inproceedings{ongaro2014understandable,
  title = {{In Search of an Understandable Consensus Algorithm}},
  author = {Diego Ongaro and John Ousterhout},
  year = {2014},
  booktitle = {USENIX ATC},
  url = {https://www.usenix.org/system/files/conference/atc14/atc14-paper-ongaro.pdf}
}

Original PDF ↗

Study Raft in ReadingTrack

Add the paper to your ReadingTrack library with its authors, venue and year, and get this page’s quiz as suggested review cards. You choose which cards to keep; nothing enters your reviews until you accept it.

Last reviewed 26 November 2026 by the ReadingTrack editors. Explanations are our own; quotes are short and attributed, and the paper is linked at its original source.