ZooKeeper是以Fast Paxos算法为基础的,Paxos 算法存在活锁的问题,即当有多个proposer交错提交时,有可能互相排斥导致没有一个proposer能提交成功,而Fast Paxos作了一些优化,通过选举产生一个leader (领导者),只有leader才能提交proposer,具体算法可见Fast Paxos。因此,要想弄懂ZooKeeper首先得对Fast Paxos有所了解。 [3] 
ZooKeeper的基本运转流程:
1、选举Leader。
2、同步数据。
3、选举Leader过程中算法有很多,但要达到的选举标准是一致的。
4、Leader要具有最高的执行ID,类似root权限。
5、集群中大多数的机器得到响应并接受选出的Leader

相关文章:

  • 2021-11-16
  • 2021-09-04
  • 2021-05-15
  • 2022-12-23
  • 2022-02-07
  • 2021-09-09
  • 2021-09-08
  • 2021-05-29
猜你喜欢
  • 2021-11-13
  • 2021-06-25
  • 2021-06-03
  • 2021-11-06
  • 2021-11-10
  • 2021-07-29
  • 2021-10-18
相关资源
相似解决方案