Home Common Problem What is ZooKeeper?

What is ZooKeeper?

Jun 24, 2020 pm 05:06 PM
zookeeper

ZooKeeper is an open source distributed coordinator and a typical distributed data consistency solution. It is designed to encapsulate complex and error-prone distributed consistency services to form an efficient and reliable system and provides users with a series of simple and easy-to-use atomic operations.

What is ZooKeeper?

ZooKeeper main features

zookeeper itself is a distributed program. As long as more than half of the nodes survive, zookeeper can Normal service.

In order to ensure high availability, zookeeper is usually deployed in the form of a cluster, so that as long as most of the machines in the cluster are available, zookeeper itself will be available.

zookeeper saves data in memory, which ensures high throughput and low latency

zookeeper is high-performance, especially in programs that read more than write, because writing will cause Synchronization status between all servers.

zookeeper has the concept of temporary nodes. A temporary node exists as long as the client session that created it remains active. When the session ends, the temporary node is deleted.

The bottom layer of zookeeper only provides two functions. 1. Manage the data submitted by the user program. 2. Provide monitoring services for the data nodes submitted by the user program.

ZooKeeper Features

ZooKeeper is based on the Fast Paxos algorithm. The Paxos algorithm has a livelock problem, that is, when there are multiple proposers staggered submissions, it is possible Mutual exclusion results in no proposer being able to submit successfully. Fast Paxos has made some optimizations and elected a leader. Only the leader can submit the proposer. The specific algorithm can be found in Fast Paxos. Therefore, if you want to understand ZooKeeper, you must first understand Fast Paxos. [2]

ZooKeeper’s basic operating process:

1. Elect Leader.

2. Synchronize data.

3. There are many algorithms in the process of electing Leader, but the election standards to be met are the same.

4. Leader must have the highest execution ID, similar to root permissions.

5. Most of the machines in the cluster respond and accept the selected Leader.

Recommended tutorial: "PHP"

The above is the detailed content of What is ZooKeeper?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Using ZooKeeper for distributed lock processing in Java API development Using ZooKeeper for distributed lock processing in Java API development Jun 17, 2023 pm 10:36 PM

Using ZooKeeper for distributed lock processing in Java API development

Using ZooKeeper and Curator for distributed coordination and management in Beego Using ZooKeeper and Curator for distributed coordination and management in Beego Jun 22, 2023 pm 09:27 PM

Using ZooKeeper and Curator for distributed coordination and management in Beego

How to use PHP's Zookeeper extension? How to use PHP's Zookeeper extension? Jun 02, 2023 pm 09:01 PM

How to use PHP's Zookeeper extension?

Should I use Redis or Zookeeper for distributed locks? Should I use Redis or Zookeeper for distributed locks? Aug 22, 2023 pm 03:48 PM

Should I use Redis or Zookeeper for distributed locks?

ZooKeeper comparison of Redis implementation of distributed locks ZooKeeper comparison of Redis implementation of distributed locks Jun 20, 2023 pm 03:19 PM

ZooKeeper comparison of Redis implementation of distributed locks

[Recommended collection] Soul torture! Zookeeper's 31-shot cannon [Recommended collection] Soul torture! Zookeeper's 31-shot cannon Aug 28, 2023 pm 04:45 PM

[Recommended collection] Soul torture! Zookeeper's 31-shot cannon

Using ZooKeeper to implement service registration and discovery in Beego Using ZooKeeper to implement service registration and discovery in Beego Jun 22, 2023 am 08:21 AM

Using ZooKeeper to implement service registration and discovery in Beego

Why doesn't Alibaba use ZooKeeper for service discovery? Why doesn't Alibaba use ZooKeeper for service discovery? Jul 26, 2023 pm 05:19 PM

Why doesn't Alibaba use ZooKeeper for service discovery?