Difference between ensemble and quorum in zookeeper

后端 未结 4 1662
花落未央
花落未央 2021-02-01 09:24

I am new to zookeeper. I have configured it on a single machine. But I came across the words \"ensemble\" and \"quorum\" in the documentation of zookeeper.

Can anyone pl

4条回答
  •  孤街浪徒
    2021-02-01 09:51

    When you want to have high availability in zookeeper server you use multiple zookeeper servers to create an ensemble. Basically zookeeper has master-slave architecture. In an ensemble there will be one master and rest will be the slaves. If the master fails one of the slaves will act as a master.

    The sequence in which a master is assigned is called as quorum. When you create an ensemble, zookeeper internally creates a sequence ID for the slave severs. When the main master fails it will check the next sequence ID to create a new master. This concept of quorum also used while creating nodes in zookeeper.

提交回复
热议问题