Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
266
|
第
14
章
它的承诺
—
成为一个可靠的一致性算法。
14.5
拜占庭共识
到目前为止,我们讨论的所有共识算法都假定不存在拜占庭故障(参见 8.7.3 节)。换句
话说,节点都“诚实”地执行算法,而不是尝试利用算法或伪造结果。
我们将看到,这一假设允许以更少的可用参与者达成共识,并且一次提交所需的网络交
互次数更少。但是,有时分布式系统也会部署在有潜在对抗性的环境中,其中各节点并
非由同一实体控制,我们需要用算法来保证:即使在某些节点行为失常甚至带有恶意的
情况下,系统仍然能够正常运行。除了人为的恶意之外,拜占庭式故障还可能由 bug、
错误配置、硬件问题或数据损坏引起。
大多数拜占庭共识算法需要用 N
2
条消息完成一个算法步骤,其中 N 表示 Quorum 的大
小,因为 Quorum 中的每个节点都必须与其他所有节点通信。每个步骤都需要用其他节
点做交叉验证,这么做是必需的,因为节点不能彼此信赖,也不能依赖领导者,必须将
返回的结果与多数响应进行比较才能验证其他节点的行为。
我们在这里只讨论一种拜占庭共识算法:实用拜占庭容错(Practical Byzantine Fault
Tolerance, PBFT)[CASTRO99]。PBFT 假定节点故障相互独立(即,故障可能会相互配
合,但不能立即或至少不会以相同的方式接管整个系统)。系统具有弱同步假设,就像
你期望中的正常网络那样:故障可能会发生,但不会无限持续下去,最终一定会恢复。
节点间的所有通信都经过加密,以防止伪造消息或网络攻击。副本知道彼此的公钥 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787111655169