Welcome back. In our last lesson, we examined how Raft's design guarantees safety during network partitions, particularly through its majority-based quorum and the use of terms as fencing tokens. We also saw how practical implementations like etcd use optimizations like PreVote to improve liveness in the face of messy, real-world failures.
So far, our discussions have often referenced Paxos as the complex predecessor that motivated Raft's creation. Now it's time to make that comparison explicit. In this lesson, you will compare Paxos and Raft in terms of understandability and practical implementation trade-offs. For an aspiring Principal Engineer, this analysis is not merely academic. It's about developing the critical judgment to evaluate foundational technologies, understand their inherent trade-offs, and articulate why one might be chosen over another in a given context—a core competency in technical leadership.
The Great Debate: Provability vs. Understandability
The fundamental difference between Paxos and Raft stems from their original design goals. Paxos, created by Leslie Lamport, was conceived as a minimal, provably correct algorithm for asynchronous consensus. Its focus is on theoretical elegance. Raft, developed decades later by Diego Ongaro and John Ousterhout, was a direct reaction to the infamous difficulty of working with Paxos.
To appreciate Raft's motivation, let's hear from one of its creators.
Tech Talk - Raft, In Search of an Understandable Consensus Algorithm by Diego Ongaro
This talk by Diego Ongaro, one of Raft's authors, provides the perfect context for our comparison. He discusses the consensus problem and the well-known challenges with Paxos that spurred Raft's development.
Please watch the first part of the talk, covering the introduction to consensus and the problems with Paxos. Pay close attention to the quotes he shares about Paxos's difficulty. Then, continue watching the section where he discusses Raft's design goals and the user study comparing its understandability to Paxos.
As Ongaro highlights, Raft's primary goal was to be understandable, making it easier to teach, learn, and, most importantly, implement correctly. This was achieved by decomposing the problem and reducing the state space. Paxos, in contrast, provides a powerful but minimal kernel, leaving the complex and error-prone engineering of a full system (like leader election and log gap management) to the implementer.
This leads to a crucial distinction for a system designer:
- Paxos offers a flexible but incomplete toolkit.
- Raft offers a complete, more opinionated blueprint.
To compare them fairly, it's helpful to first align their terminology.

The Core Algorithmic Difference: Leader Election
While Raft and Multi-Paxos both use a leader-based approach for steady-state operation, their methods for selecting that leader and ensuring safety during a change are fundamentally different. This is the heart of their algorithmic divergence.
A key paper and an accompanying talk by researcher Heidi Howard offer a fantastic analysis of this difference. She "Raftifies" Paxos—describing it using Raft's terminology—to make a direct, apples-to-apples comparison.
Heidi Howard — Paxos vs Raft: Have we reached consensus on distributed consensus?
In this talk, Heidi Howard breaks down the mechanics of leader election in both Paxos and Raft, providing a clear, side-by-side explanation.
Watch the segment from Handling leader failures. The video first establishes common concepts like terms and server states, then dives into the specific, differing implementations for Paxos and Raft, culminating in a discussion of how each guarantees safety across terms. This section clearly visualizes the mechanical differences.
The core trade-off in leader election can be summarized as:
- Raft: Restrict who can become leader. A candidate can only win an election if its log is "at-least-as-up-to-date" as a majority of the cluster. This is a simple, binary check. The
RequestVoteRPC is lightweight, containing only metadata. The new leader's log is guaranteed to be correct from the start. - Paxos: Allow anyone to become leader, then fix their log. A candidate can always attempt to become leader. It uses Phase 1 (the
Prepare/Promiseexchange) to read the state from a quorum of acceptors. ThePromisemessages contain log entries, which the new leader uses to update its own log before it starts proposing new values.
To formalize these concepts, let's turn to the paper the talk was based on.
Paxos vs Raft: Have we reached consensus on distributed ...
This paper provides a concise, academic comparison of the two protocols, focusing on the mechanics of leader election.
First, read Section 3.3, Handling leader failures. This section describes the two different approaches side-by-side using the same terminology. Next, study Section 4, Discussion, which analyzes the trade-offs in understandability and efficiency. Finally, carefully review Table 1, Summary of the differences. This table is an excellent, compact summary of the key mechanical differences in ensuring leadership and safety.
This analysis reveals a set of nuanced, practical trade-offs:
| Aspect | Paxos | Raft |
|---|---|---|
| Leader Election | Any server can try. Leadership is an emergent property of a successful Phase 1. | A distinct, built-in protocol. Only servers with up-to-date logs can be elected. |
| Safety Mechanism | Phase 1 is a "read-modify-write" quorum operation. The leader discovers and adopts committed state. | The RequestVote process is a "permission check." The leader is guaranteed to already have the state. |
| Message Size | Promise replies can be large, as they may contain uncommitted log entries. |
RequestVote RPCs are small and contain only metadata (last log index/term). |
| Election Contention | Contention is avoided by partitioning terms among servers (e.g., round-robin or server_id in term). |
Split votes are possible if multiple candidates start an election in the same term. Requires randomized timeouts to mitigate. |
| Log Management | Allows out-of-order decisions, which can create "gaps" in the log that must be filled. | Enforces a strictly ordered log with no gaps. The leader forces followers to match its log. |

The Principal Engineer's Verdict
So, which is better? As Heidi Howard concludes in her talk, for many standard use cases, "it doesn't matter." The steady-state performance is largely identical. The differences are most pronounced during leader failure and recovery.
However, from a practical system-building and strategic perspective, the choice is significant.
On Understandability
The claim that Raft is "more understandable" is nuanced.
- The Raft paper is undeniably easier to understand than the Paxos paper.
- The Raft algorithm specification is more complete and prescriptive, making it easier to implement correctly without extensive prior expertise. It gives you the whole car.
- The core Paxos algorithm is arguably no more complex than Raft's core safety logic, but it's just a kernel. It gives you a powerful engine, but you must design and build the chassis, transmission, and steering yourself.
On Implementation and Ecosystem
- Raft's completeness makes it ideal for building new systems where a reliable, off-the-shelf consensus module is needed. This is why it was quickly adopted for modern infrastructure tools like
etcd, Consul, and Kafka (with KRaft). - Paxos and its many variants are foundational to some of the most robust, high-performance systems ever built, including Google's own Chubby and Spanner. Its flexibility allows for extensive optimization, but this comes at the cost of immense implementation complexity. Understanding Paxos is crucial for working on or integrating with these foundational Google systems.
The following resource provides an excellent summary of these real-world trade-offs.
An Analysis of Distributed Consensus and System Tradeoffs - Uplatz
This article does a great job of framing the practical choice between the two algorithms and connecting them to real-world systems.
Please read the section Comparative Analysis, focusing on the "Design Philosophy" discussion and the summary table. Then, review the case studies to see how these choices play out in systems like etcd, Spanner, and Zookeeper.
The choice is ultimately not about an absolute "best" but about fitness for purpose. If you need a robust, well-understood, and easy-to-implement consensus system for a new project, Raft is an outstanding choice. If you are building a highly specialized, performance-critical piece of core infrastructure and have the deep expertise to navigate its complexities and vast optimization literature, a Paxos variant might be the right tool.
Conclusion
In this lesson, we dissected the long-standing comparison between Paxos and Raft. We've moved beyond the simple "Raft is easier" narrative to a more nuanced understanding of their specific trade-offs.
Your key takeaways are:
- Philosophical Difference: Paxos was designed for provability, yielding a minimal, flexible kernel. Raft was designed for understandability, yielding a complete, integrated system specification.
- Core Algorithmic Difference: Their primary divergence is in leader election. Raft restricts who can become a leader (must have an up-to-date log), resulting in lightweight election messages. Paxos allows any server to try, but requires a more complex "read-and-repair" phase with potentially larger messages.
- Practical Trade-offs: Raft's approach simplifies implementation and is efficient for failover, but can suffer from election contention. Paxos is more complex to build into a full system and has a heavier leader-change protocol, but its flexibility has enabled a vast ecosystem of optimizations.
- The Engineer's Choice: The decision depends on the context: Raft is excellent for new, general-purpose systems, while Paxos variants are often found at the heart of bespoke, highly-optimized infrastructure like that at Google.
We have now examined how consensus protocols operate and how they behave during catastrophic failures like network partitions. However, the real world is often more subtle. In our next lesson, we will explore a more insidious class of problems by analyzing the impact of gray failures such as slow nodes and clock drift on consensus protocol stability. This will push our understanding from clean failure models into the messy reality of large-scale production systems.