分布式一致性算法Raft论文(1)——介绍

1 Introduction

我们需要更易懂的算法,并且更容易在实际场景中工程化。

Consensus algorithms allow a collection of machines to work as a coherent group that can survive the failures of some of its members. Because of this, they play a key role in building reliable large-scale software systems.
Paxos [15, 16] has dominated the discussion of consensus algorithms over the last decade: most implementations of consensus are based on Paxos or influenced by it, and Paxos has become the primary vehicle used to teach students about consensus.

共识算范允许一组机器作为一个连贯的群体工作,能够在某些成员失败的时候依然work。因此,他们在构建可靠的大规模软件系统中起着关键作用。

然而,Paxos 在过去10年中主导着共识算法:共识的大多数实现都基于Paxos或者受其影响,Paxos已经成为主要的教学工具。


Unfortunately, Paxos is quite difficult to understand, in spite of numerous attempts to make it more approachable. Furthermore, its architecture requires complex changes to support practical systems. As a result, both system builders and students struggle with Paxos.

不行的是Paxos 难于理解,尽管相当一部分人努力使其更易懂。此外,其架构需要复杂的变化来支持实际的系统。结果是 系统开发者和学生都在和其斗争。

After struggling with Paxos ourselves, we set out to find a new consensus algorithm that could provide a better foundation for system building and education. Our approach was unusual in that our primary goal was understandability: could we define a consensus algorithm for practical systems and describe it in a way that is significantly easier to learn than Paxos? Furthermore, we wanted the algorithm to facilitate the development of intuitions that are essential for system builders. It was important not just for the algorithm to work, but for it to be obvious why
it works.

在与Paxos斗争之后,我们开始寻找一种新的共识算法,它可以为系统构建和教育提供更好的基础。我们的方法比较不同,因为我们的主要目标是可理解性:

我们是否可以为实际系统定义一个一致性算法,并以一种比Paxos更容易学习的方式来描述它?此外,我们希望该算法能够促进直觉的发展,而直觉对于系统构建者来说是必不可少的。重要的是,不仅要让算法发挥作用,而且要让它明白为什么它会起作用。

        The result of this work is a consensus algorithm called Raft. In designing Raft we applied specific techniques to improve understandability, including decomposition (Raft separates leader election, log replication, and safety) and state space reduction (relative to Paxos, Raft reduces the
degree of nondeterminism and the ways servers can be inconsistent with each other). A user study with 43 students at two universities shows that Raft is significantly easier to understand than Paxos: after learning both algorithms, 33 of these students were able to answer questions about Raft better than questions about Paxos.

这项工作的成果是一个称为“Raft”的一致性算法。在设计Raft时,我们应用了特定的技术来提高可理解性,包括分解(Raft分离领导人选举、日志复制和安全)和状态空间缩减(相对于Paxos,Raft降低了不确定性的程度以及服务器之间不一致的方式)。一项针对两所大学43名学生的用户研究表明,Raft比Paxos更容易理解:在学习了这两种算法后,其中33名学生能够比Paxos更好地回答有关Raft的问题。


        Raft is similar in many ways to existing consensus algorithms (most notably, Oki and Liskov’s Viewstamped Replication [29, 22]), but it has several novel features:

        Raft在许多方面与现有的一致性算法相似,但它有几个新颖的特性:

  • Strong leader: Raft uses a stronger form of leadership than other consensus algorithms. For example,log entries only flow from the leader to other servers.This simplifies the management of the replicated log and makes Raft easier to understand.
  • 健壮的leader:Raft使用比其他共识算法更强有力的leader策略。例如,日志条目只从leader流向其他服务器。这简化了对复制日志的管理并使Raft更易于理解。
  • Leader election: Raft uses randomized timers to elect leaders. This adds only a small amount of mechanism to the heartbeats already required for any consensus algorithm, while resolving conflicts simply and rapidly.
  • leader选举:Raft使用随机计时器来选举leader。这只为任何共识算法所需的心跳增加了少量机制,同时简单快速地解决了冲突。
  • Membership changes: Raft’s mechanism for changing the set of servers in the cluster uses a new joint consensus approach where the majorities of two different configurations overlap during transitions. This allows the cluster to continue operating normally during configuration changes. 
  • 成员变更:Raft更改集群中服务器集的机制使用了一种新的联合一致性方法,其中两种不同配置的大多数在转换期间重叠。这允许群集在配置更改期间继续正常运行。

        We believe that Raft is superior to Paxos and other consensus algorithms, both for educational purposes and as a foundation for implementation. It is simpler and more understandable than other algorithms; it is described completely enough to meet the needs of a practical system;it has several open-source implementations and is used by several companies;its safety properties have been formally specified and proven; and its efficiency is comparable to other algorithms.

        我们认为,RAFT优于Paxos和其他一致性算法,既用于教育目的,又作为实现的基础。它比其他算法更简单、更容易理解;它的描述足够完整,可以满足实际系统的需要;它有多个开源实现,并被多家公司使用;它的安全属性已被正式指定和证明;其效率与其他算法相当。

       
        The remainder of the paper introduces the replicated state machine problem (Section 2), discusses the strengths and weaknesses of Paxos (Section 3), describes our general approach to understandability (Section 4), presents the Raft consensus algorithm (Sections 5–8), evaluates
Raft (Section 9), and discusses related work (Section 10).     

本文的其余部分介绍了:

复制状态机问题(第2节),

讨论了Paxos的优缺点(第3节),

描述了我们的可理解性一般方法(第4节),

介绍了Raft共识算法(第5-8节),

并对其进行了评估(第9节)

讨论相关工作(第10节)。

          

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值