Use Zookeeper to achieve leader election

In distributed computing, leader election is a very important function. The election process is like this: assign a process as an organizer and distribute tasks to nodes. Before the task starts, no node knows who is the leader or coordinator. When the election algorithm starts to execute, each node will eventually get a unique node as the task leader. In addition, elections often occur when the leader goes down unexpectedly, and a new leader has to be elected.

Curator has two election recipes (Leader Latch and Leader Election)

 

Guess you like

Origin blog.csdn.net/Leon_Jinhai_Sun/article/details/112853515