Tag: in general, it is the restart mechanism, nbsp INF span, Now picture
XX is our master, that is, our master node. Heartbeat mechanism. When a node fails, the entire cluster can still work. In the election mode, our current master runs normally, but in some cases it goes down and crashes. At this time, there will be no master in this cluster, there are no master two slave instances to compete. After the competition, slave1 gave slave2, or slave2 gave slave1. After the competition, we will have one left, and the rest will be successfully converted into another master.
If the original master is restored, after the O & M restart or repair is successful, it will actually access our cluster.
The election mode, ZK cluster, requires a quantity. At least one cluster must have three nodes, one master node and two slave nodes. In other words, the push is 3, 5, 7, and 9. Generally, if there are seven ZK clusters in an enterprise, such an enterprise can be said to be very large.
Chapter 1 Basic concepts of the election mode and zookeeper cluster installation 5-1