惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
Jina AI
Jina AI
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
J
Java Code Geeks
V
Visual Studio Blog
腾讯CDC
博客园 - 【当耐特】
博客园 - 司徒正美
小众软件
小众软件
宝玉的分享
宝玉的分享
博客园 - Franky
量子位
有赞技术团队
有赞技术团队
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
N
News | PayPal Newsroom
D
Docker
Google Online Security Blog
Google Online Security Blog
博客园 - 聂微东
A
About on SuperTechFans
S
Security Affairs
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Securelist
T
The Exploit Database - CXSecurity.com
爱范儿
爱范儿
MyScale Blog
MyScale Blog
V
Vulnerabilities – Threatpost
S
Security @ Cisco Blogs
T
Threatpost
Scott Helme
Scott Helme
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Palo Alto Networks Blog

博客园 - LittlePeng

ffmpeg+x264 Windows MSVC 静态编译 NodeJS Addon 多线程通信 c coroutine leveldb(ssdb)性能、使用场景评估 [微信协议分析] 多媒体 [微信协议分析] 多点登陆 [微信协议分析] 文本消息 分布式一致性算法 erlang 健壮性 tcp 出现rst情况整理 tcp_tw_reuse、tcp_tw_recycle 使用场景及注意事项 erlang 在线生成crashdump erlang 故障排查工具 erlang 虚机crash Erlang C1500K长连接推送服务-内存 Erlang C1500K长连接推送服务-性能 redis lua erlang 虚机性能调优 java问题排查总结
paxos(chubby) vs zab(Zookeeper)
LittlePeng · 2015-01-03 · via 博客园 - LittlePeng

参考:

Zookeeper的一致性协议:Zab

Chubby&Zookeeper原理及在分布式环境中的应用

Paxos vs. Viewstamped Replication vs. Zab

Zab: High-performance broadcast for primary-backup systems

Chubby:面向松散耦合的分布式系统的锁服务 

Chubby 和Zookeeper 的理解

zookeeper 使用Zab(zookeeper atom broadcast).

Zab集群机器越多,写性能会有所降低、读性能得到水平扩展。从Follower直接读取数据,虽不保证最新但最终会读到最新的,为其应用领域配置管理上读>>写而设计。

具体下面描述更加清楚:

Zab is a different protocol than Paxos, although it shares with it some key aspects, as for example:

  • A leader proposes values to the followers
  • Leaders wait for acknowledgements from a quorum of followers before considering a proposal committed (learned)
  • Proposals include epoch numbers, which are similar to ballot numbers in Paxos

The main conceptual difference between Zab and Paxos is that it is primarily designed for primary-backup systems, like Zookeeper, rather than for state machine replication.

Paxos can be used for primary-backup replication by letting the primary be the leader. The problem with Paxos is that, if a primary concurrentlyproposes multiple state updates and fails, the new primary may apply uncommitted updates in an incorrect order. An example is presented in our DSN 2011 paper (Figure 1). In the example, a replica should only apply the state update B after applying A. The example shows that, using Paxos, a new primary and its follows may apply B after C, reaching an incorrect state that has not been reached by any of the previous primaries.

A workaround to this problem using Paxos is to sequentially agree on state updates: a primary proposes a state update only after it commits all previous state updates. Since there is at most one uncommitted update at a time, a new primary cannot incorrectly reorder updates. This approach, however, results in poor performance.

Zab does not need this workaround. Zab replicas can concurrently agree on the order of multiple state updates without harming correctness. This is achieved by adding one more synchronization phase during recovery compared to Paxos, and by using a different numbering of instances based on zxids.

Chubby VS Zookeeper: