Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
172
|
第
9
章
从实际的角度来看,排除发生故障的进程有助于避免不必要的工作,防止错误传播和级
联故障,而排除疑似故障的活动进程会降低系统可用性。
故障检测算法应该表现出几个基本特性。首先,每一个没有问题的成员最终都应该注
意到进程故障,并且算法应该能够向前推进并最终得出结果。这种特性称为
完备性
(completeness)。
我们可以通过算法的
效率
来判断其优劣:故障检测器识别进程故障的速度有多快。另一
种方法是观察算法的
准确性
:是否精确地检测到了进程故障。换句话说,如果一个算法
错误地认为一个活着的进程发生了故障或者不能检测出实际已发生的故障,那么它就是
不
准确的。
我们可以把效率和准确度之间的关系看作是一个可调参数:一个更高效的算法可能更不
准确,而一个更准确的算法通常更不高效。建立既准确又高效的故障检测器被证明是不
可能的。同时,故障检测器是允许产生假阳性的(即,错误地将活着的进程识别为故障,
或者反过来)[CHANDRA96]。
故障检测器是许多共识和原子广播算法的必要前提和组成部分,我们将在本书后面讨论
这些算法。
许多分布式系统使用
心跳
(heartbeat)来实现故障检测器。由于其简单性和很强的完备
性,这种方法非常普遍。我们在这里讨论的算法假设不存在拜占庭式故障:进程不会试
图故意谎报它们自己及相邻进程的状态。
9.1
心跳和
ping
我们可以通过触发如下两个周期性过程之一来查询远程进程的状态 :
•
我们可以触发一个 ping,它将消息发送到远程进程,通过在指定的时间段内是否得
到响应来检查它们是否仍处于活动状态。 ...
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