What's the difference between ZooKeeper and any distributed Key-Value stores?

前端 未结 2 1646
离开以前
离开以前 2021-02-07 12:49

I am new to zookeeper and distributed systems, and am learning it myself.

From what I understand for now, it seems that ZooKeeper is simply a key-value store whose keys

2条回答
  •  清歌不尽
    2021-02-07 13:39

    You can compare zookeeper with other distributed key-value store such as etcd and consul. These tools are also offering the same benefits of apache zookeeper. The main advantage of zookeeper is that it takes care of avoiding deadlock and race condition in a distributed applications. Zookeeper is not only a key-value store, It can be also used for service discovery and centralised service for maintaining configuration information in a distributed application.

    The way zookeeper store its key-value pair is bit different than other key-value stores, Zookeeper uses z-node as a key. It looks like a unix filesystem tree and it starts with slash(/) It may be persistent or ephemeral. This key-value is served through RAM. Each node has its own ACL. Zookeeper stores transaction log and snapshot for recovering node in case of disaster, It is designed to behave as a fault tolerant and distributed k-v store, So it should be deployed as a cluster. A group of zookeeper server is called zookeeper ensemble. Here there is one zookeeper leader server and the remaining ones are the followers. This leader and follower relationship is derived from the leadership election between zk servers in a cluster.

    Zookeeper is mainly used in HA implementation of Hadoop Namenode and YARN Resource manager here it takes care of promoting the active and standby status of these daemons, Kafka is designed to use Zookeeper for storing the topic and offset information.

    Zookeeper can also be used as an alternative for etcd in kubernetes control plane.

提交回复
热议问题