Skip to Content
构建可扩展分布式系统:方法与实践
book

构建可扩展分布式系统:方法与实践

by Ian Gorton
May 2024
Intermediate
278 pages
5h 24m
Chinese
China Machine Press
Content preview from 构建可扩展分布式系统:方法与实践
220
|
13
会响应客户端。
WAIT
的代价是更长的延迟。此外,它仅保证数据驻留在内存中的副本内。
在下一个
AOF
写入快照之前,若副本崩溃,则仍可能会导致更新丢失。
13.1.3.5
可用性
Redis Cluster
为单个数据库分片实现了一个久经考验的主副本架构。但是,写入可用性
不可避免地受到领导者故障的影响,在将副本提升为领导者之前,给定分片的写入将不
可用。
网络故障可以将
Redis
集群拆分为多数分区和少数分区。这会影响可用性和数据安全性。
只要分区中至少有一个可用副本,客户端写入请求就可以继续写到两个分区中的所有领导
节点。如果有一个领导者与它的副本分离,落到少数分区,而副本落在多数分区,那么客
户端在少数分区的写入仍然可用。经过一个超时周期后,少数分区的领导者将停止接受写
入,因为它无法向副本发送更新。同时,落到多数分区中的副本将进行领导者选举,副本
将被提升为主节点。当分区恢复时,在少数分区中的领导者的写入修改将丢失。
13.2 MongoDB
2009
年首次发布以来,
MongoDB
一直走在
NoSQL
数据库的前沿。它在本质上协调
数据库模型与对象模型,直接解决了众所周知的对象关系阻抗不匹配问题。我们可以将
生成的文档数据库视为
JSON
数据库。你可以将业务对象转换为
JSON
,并将数据直接
作为文档存储、查询和操作。不需要复杂的对象关系映射器,直观且更简单地展示业务
逻辑。
1
MongoDB
最初流行起来是因为它易于编程和使用。早期版本中的底层存储引擎,称为
MMAPv1
2
,还有一些不足之处
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

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
Three Essentials for Agentic AI Security

Three Essentials for Agentic AI Security

Paolo Dal Cin, Daniel Kendzior, Yusof Seedat, Renato Marinho

Publisher Resources

ISBN: 9787111750697