知识库--ZooKeeper+Architecture(59)

来源:互联网 发布:小米下载不了软件 编辑:程序博客网 时间:2024/06/05 23:45

ZooKeeper+ Architecture

Now that we have discussed at a high level the operations that ZooKeeper exposes to applications, we need to understand more of how the servicec actually works. Applications make calls to ZooKeeper through a client library. The client library is responsible for the interaction with ZooKeeper servers.

Look at the following Figure, shows the relationship between clients and servers. Each client imports the client library, and then can communicate with any ZooKeeper node.
这里写图片描述

ZooKeeper servers run in two modes: standalone (独立模式)and quorum(仲裁模式). Standalone mode is pretty much what the term says: there is a single server, and ZooKeeper state is not replicated. In quorum mode, a group of ZooKeeper servers, which we call a ZooKeeper ensemble(集合), replicates the state, and together they serve client request. From this point on, we use the term “ZooKeeper ensemble” to denote an installation of servers. This installation could contain a single server and operate in standalone mode or contain a group of servers and operate in quorum mode.

0 0
原创粉丝点击