HackerPapers

arXiv:2004.05074cs.DC

Paxos vs Raft: Have we reached consensus on distributed consensus?

Heidi Howard, Richard Mortier

Abstract

Distributed consensus is a fundamental primitive for constructing fault-tolerant, strongly-consistent distributed systems. Though many distributed consensus algorithms have been proposed, just two dominate production systems: Paxos, the traditional, famously subtle, algorithm; and Raft, a more recent algorithm positioned as a more understandable alternative to Paxos. In this paper, we consider the question of which algorithm, Paxos or Raft, is the better solution to distributed consensus? We analyse both to determine exactly how they differ by describing a simplified Paxos algorithm using Raft's terminology and pragmatic abstractions. We find that both Paxos and Raft take a very similar approach to distributed consensus, differing only in their approach to leader election. Most notably, Raft only allows servers with up-to-date logs to become leaders, whereas Paxos allows any server to be leader provided it then updates its log to ensure it is up-to-date. Raft's approach is surprisingly efficient given its simplicity as, unlike Paxos, it does not require log entries to be exchanged during leader election. We surmise that much of the understandability of Raft comes from the paper's clear presentation rather than being fundamental to the underlying algorithm being presented.

arXiv comments
To be published in the 7th Workshop on Principles and Practice of Consistency for Distributed Data (PaPoC)
Journal reference
DOI
doi:10.1145/3380787.3393681
Subjects
cs.DCDistributed, Parallel, and Cluster Computing

On Hacker News

Linked by 8 identifiable commenters in 10 comments across 7 threads, from May 2020 to Sep 2024. Found in 2 HN submissions from Apr 2020 to May 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments7 threads

    • I am in the minority who thinks Raft is overrated. I tried teaching Raft one year instead of Paxos but ended up switching back. While it was much easier to understand how to implement Raft, I think my students gained deeper insight when focusing on single-decision Paxos. There…

      _russrossView on HNParent context

    • The papers and talks[1] by Heidi Howard and Richard Mortier, in particular “Paxos vs Raft: Have we reached consensus on distributed consensus?”[2,3] and “Flexible Paxos”[4,5], are what finally made things click for me. A real implementation also needs other stuff[6], though…

      mananaysiempreView on HNParent context

  1. Why use Paxos instead of Raft? 1 comment
    • https://arxiv.org/abs/2004.05074 This paper argues basically argues that raft has a different leadership election mechanism than paxos, but that if you tweak some terminology, and make a few relatively reasonable implementation choices for paxos they are otherwise pretty…

      jsmith45View on HNParent context

  2. Paxos 1 comment
    • For those wondering what the differences between Raft and Paxos are: I can highly recommend the following paper https://arxiv.org/abs/2004.05074 It presents Paxos similarly to how Raft was originally presented.

      solidangleView on HNParent context

  3. Paxos 2 comments
    • (Multi-)Paxos and Raft are incredibly similar. I would even argue that Raft is just a variant of Paxos in the same way that e.g. Fast Paxos and EPaxos are variants of Paxos. Most of the Raft algorithm is identical to the Paxos algorithm. The main difference between the two…

      solidangleView on HNParent context

    • You might be interested in this paper [1] which presents Paxos in the same way as Raft is presented in the Raft paper. In my view it really illustrates that most of the simplicity of Raft comes from its excellent presentation and not necessarily from its algorithmic simplicity.…

      solidangleView on HNParent context

    • Best in what metric? raft and paxos are basically the same, besides leader election, which raft's take makes it simply easier and possible even more efficient[0]. I say "possible" because that depends very much on the consensus state over time, which in most actual workloads can…

      tlamponiView on HNParent context

    • As it pertains to reaching consensus, everything in the "Basic Paxos" section of the article is the same for Raft as it is Paxos. Raft can be seen as instance of Paxos with different terminology and prescribed solutions for leader elections, solving dueling leader issues, and…

      rubiquityView on HNParent context

    • I'll have to admit that over time I've ended up with mixed feelings about this paper. This is mainly due to people reading this paper without knowing much about consensus and drawing conclusions like "Raft is better than Paxos" or "Raft is the best consensus algorithm" though.…

      judofyrView on HNParent context

    • That's interesting because the recent arxiv paper[1] by Heidi Howard indicated that Raft just has a clearer presentation rather than some technical superiority of being simpler (discussion here [2]). So perhaps people who believe in Paxos need to come up with similarly easy…

      vlovich123View on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.