当前位置:网站首页>Zab agreement
Zab agreement
2022-04-22 08:50:00 【The figure under the stars】
ZAB agreement : It is a distributed coordination service Zookeeper A specially designed message broadcasting protocol supporting crash recovery , The distributed data consistency is realized .
All client requests are written to Leader In progress , Then from leader Process synchronization to other nodes , be called Follower. In the process of cluster data synchronization , If appear Follower The node crashes or Leader When the process crashes , Need to pass through ZAB Protocol to ensure data consistency .
ZAB The protocol includes two basic modes : Crash recovery and Message broadcast
-
Message broadcast
All transaction requests of the cluster are made by Leader Node to handle . When Leader After receiving the request , Convert the requested transaction into a transaction Proposal, And will Proposal Distributed to all others in the cluster Follower.
After the broadcast ,Leader wait for Follower Reply to . When more than half of Follower reply ,Leader Will be sent to the in the cluster again Follower radio broadcast Commit Information .Commit The message is to confirm the previous Proposal Submit .
Leader Node writing is a two-step operation , The first step is to broadcast transaction operations , The second step is the broadcast submission operation . -
Crash recovery
a. Initialize cluster , When it started ;
b. Leader The server is down
c. Leader The server is disconnected from more than half of the nodes in the clusterAt this point, a new round of elections will begin , Elected Leader With more than half Follower To synchronize , Make the data consistent . When synchronization is over , Exit recovery mode , Enter message broadcast mode .
Whole Zookeeper Cluster consistency guarantee , Is the switching between the above two states , When Leader When the service is normal , It's the normal message broadcast mode ; When Leader Is not available , Is to enter crash recovery mode , Crash recovery mode will synchronize data , After completion , Re enter message broadcast mode .
版权声明
本文为[The figure under the stars]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220750015111.html
边栏推荐
猜你喜欢
随机推荐
Linux(CentOS)下安装 PostgreSQL
工业缺陷检测项目实战(三)——基于FPN_Tensorflow的PCB缺陷检测
CSDN(Markdown模式)如何实现:页内跳转
Fabric测试示例,遇到orderer Exited(x) x seconds
@Mapper和@Repository的使用和区别
HyperLedger Explorer 0.3.9环境搭建
机器学习之概率模型
PCIe learning - Introduction to PCIe bus architecture: transaction layer - data link layer - physical layer (8)
varchar与char有什么区别?
Advanced usage skills of nmap
nacos源代码编译中遇到的问题解决后整理如下
win系统pinpoint编译安装遇到的坑和大家分享
安卓开发——SQLite和SQLiteDatabase应用实验6笔记
CASE WHEN 及 SELECT CASE WHEN的用法 非常好用
素数求解的N种境界
py技能树
Nessus漏洞扫描简介
elastic-job安装部署接入
C语言的攻克之路
微信小程序手机号码如何进行解密









