arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2004.05074cs.DC
收藏

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

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

Heidi Howard, Richard Mortier

摘要:

分布式共识是构造容错的、强一致的分布式系统的基本原语。虽然已经提出了许多分布式共识算法,但只有两个占主导地位的生产系统:Paxos,传统的,以微妙而闻名的算法;以及Raft,一个更近的算法,定位为Paxos的更容易理解的替代品。在本文中,我们考虑的问题,哪种算法,Paxos或筏,是更好的解决方案,分布式共识?我们分析两者,以确定它们是如何不同的描述一个简化的Paxos算法使用筏的术语和务实的抽象。我们发现Paxos和Raft对分布式共识采取了非常相似的方法,不同之处仅在于他们对领导者选举的方法。最值得注意的是,Raft只允许具有最新日志的服务器成为领导者,而Paxos允许任何服务器成为领导者,前提是它更新日志以确保它是最新的。与Paxos不同,Raft的方法非常简单,因为它不需要在leader选举期间交换日志条目。我们推测,Raft的大部分可理解性来自论文的清晰介绍,而不是基础算法的基础。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑