Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of Zookeeper?

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Zookeeper's role is what, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, people who have this need can learn, I hope you can gain something.

What is Zookeeper?

ZooKeeper, as its name suggests, is a Zookeeper who manages elephants (Hadoop), bees (Hive), pigs (Pig), Apache Hbase and Apache Solr, LinkedIn sensei and other projects. ZooKeeper is a distributed, open source distributed application coordination service. ZooKeeper is based on Fast Paxos algorithm to realize distributed applications such as synchronization service, configuration maintenance and naming service.

The above explanation doesn't feel enough, it's too official. Zookeeper can be understood from a programmer's perspective as an overall monitoring system for Hadoop. If namenode,HMaster goes down, then Zookeeper re-elects the leader. This is where its greatest effect lies. Here is a detailed description of zookeeper's role

The role of zookeeper

Zookeeper enhances cluster stability

Zookeeper enables distributed processes to work together through a hierarchical namespace similar to a file system. These namespaces consist of a series of data registers, which we also call znodes. These znodes are a bit like files and folders in a file system. Unlike file systems, file system files are stored in storage, while zookeeper data is stored in memory. At the same time, this means zookeeper has high throughput and low latency.

Zookeeper achieves high performance, high reliability, and orderly access. The high performance ensures that zookeeper can be applied to large distributed systems. High reliability guarantees that it will not cause any problems due to the failure of a single node. Ordered access ensures that clients can perform complex synchronization operations.

Zookeeper enhances cluster persistence

ZooKeeper Service

The servers that make up Zookeeper must be able to communicate with each other. They keep server state in memory, log operations, and persist snapshots. Zookeeper is available as long as most servers are available.

The client connects to a Zookeeper server and maintains a TCP connection. and send requests, get replies, get events, and send connection signals. If the TCP connection is broken, the client can connect to another server.

Zookeeper guarantees cluster orderliness

Zookeeper uses numbers to tag each update. This ensures that Zookeeper interactions are orderly. Subsequent operations can implement higher and more abstract services such as synchronous operations according to this order.

Zookeeper ensures cluster efficiency

Zookeeper's efficiency is more evident in read-based systems. Zookeeper can perform well on distributed systems consisting of thousands of servers with a read/write ratio of approximately 10:1.

Data structures and hierarchical namespaces

Zookeeper's namespace structure is similar to file systems. A name is represented as a path using/as well as a file, and each node of zookeeper is uniquely identified by the path

Zookeeper plays a specific role in Hadoop and hbase

Hadoop has NameNode, HBase has HMaster, why do you need zookeeper? Here are some examples to introduce you.

In a Zookeeper cluster, there are 3 Zookeeper nodes. In the case of one leader and two followers, stop the leader, and then the two followers elect a leader. The data obtained is unchanged. I think Zookeeper can help Hadoop:

Hadoop, using Zookeeper event processing ensures that there is only one NameNode for the entire cluster, storing configuration information, etc.

HBase, which uses Zookeeper event handling to ensure that there is only one HMaster for the entire cluster, detects HRegionServer online and downtime, stores access control lists, etc.

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report