Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zk leader election #12

Open
ping-chang-xin opened this issue Dec 7, 2021 · 0 comments
Open

zk leader election #12

ping-chang-xin opened this issue Dec 7, 2021 · 0 comments

Comments

@ping-chang-xin
Copy link
Owner

ping-chang-xin commented Dec 7, 2021

FastLeaderElection

zk内部实现了好几种领导者选举算法,3.5.8中默认采用的是FastLeaderElection,体系结构图如下

zk-Fle

  • 网络层使用的是BIO模型
  • 针对每个集群中的服务器,都会相应的创建一个发送线程和一个接受线程
  • 同时,内部大量使用了阻塞队列,解耦各个子模块及进程间通信

未完待续。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant