Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
187
第
11
章
复制和一致性
在继续讨论共识和原子提交算法之前,让我们学习最后一块缺失的部分:
一致性模型
(consistency model)。一致性模型非常重要,因为它们解释了多数据副本系统的可见性
语义和行为。
容错
(fault tolerance)描述了这样一种特性:当系统中的部分组件发生故障时,系统仍
然能继续正确地运行。使系统具有容错性并不是一件容易的事情,而使现有的系统具备
容错能力则更加困难。容错的主要目标是从系统中消除单点故障,并确保关键任务组件
有冗余。通常,冗余对用户来说是完全透明的。
系统可以存储多个数据副本,当其中一台机器发生故障时,通过另一台机器可以进行
故障转移(failover),这样系统就可以继续正确运行。在具有单一真相来源(source of
truth)的系统中(例如,主 / 副本数据库),可以通过将副本晋升为新的主数据库来显式
地完成故障转移。有些系统则不需要显式的重新配置,它们通过在读写查询期间收集多
个参与者的响应来确保一致性。
数据
复制
(replication)通过在系统中维护多个数据副本来引入冗余。然而,由于原子地
更新数据的多个副本是一个等同于共识的问题 [MILOSEVIC11],因此数据库中的
每个
操作都执行共识操作可能成本相当高。我们可以探索一些性价比更高且更灵活的方法,
允许参与者之间存在某种程度的差异,但使数据从用户的角度
看起来
是一致的。
在多数据中心部署中,复制尤为重要。在这种情况下,跨地域复制(geo-replication)有
多种用途:它通过提供冗余来提高可用性,增强抵御一个或多个数据中心的故障的能力。 ...
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