论文标题

Paxos vs Raft:我们是否对分布式共识达成共识?

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

论文作者

Howard, Heidi, Mortier, Richard

论文摘要

分布式共识是构建耐断层,强烈的分布式系统的基本原始性。尽管已经提出了许多分布式共识算法,但只有两个主导的生产系统:Paxos,传统,著名的微妙,算法; Raft是一种最新的算法,将其定位为Paxos的更易于理解的替代品。 在本文中,我们考虑了哪种算法,PAXOS或筏的问题是分布式共识的更好解决方案?我们通过使用筏的术语和务实的抽象来描述简化的Paxos算法来确定它们如何确定它们的差异。 我们发现,Paxos和Raft都采用非常相似的方法来分布共识,仅在其领导者选举的方法方面有所不同。最值得注意的是,RAFT仅允许具有最新日志的服务器成为领导者,而Paxos则允许任何服务器成为领导者,前提是它更新日志以确保其最新。鉴于其简单性,与Paxos不同,Raft的方法令人惊讶地有效,因为与Paxos不同,它不需要在领导者选举期间交换日志条目。我们推测,筏的许多可理解性来自论文的清晰介绍,而不是对所呈现的基础算法至关重要。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源