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

The characteristics, structure and usage of zookeeper

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces the characteristics, structure and usage of zookeeper. In daily operation, I believe many people have doubts about the characteristics, structure and usage of zookeeper. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about the characteristics, structure and usage of zookeeper! Next, please follow the editor to study!

Overview of zookeeper ① zookeeper

Zookeeper is an open source distributed Apache project that provides coordination services for distributed applications.

Working mechanism:

Features of ② zookeeper

The structure of ③ zookeeper

④ application scenario

The services provided include: unified naming service, unified configuration management, unified cluster management, dynamic online and offline server nodes, soft load balancing and so on.

Specific reference documentation.

How does ⑤ use Zookeeper to implement a distributed application configuration center?

Using Zookeeper to realize distributed Application configuration Center

The so-called configuration center, as the name implies, is that publishers publish data to one or a series of nodes of ZooKeeper for subscribers to subscribe to data, so as to achieve the purpose of dynamic acquisition of data, centralized management of configuration information and dynamic updating of data.

Publish / subscribe systems generally have two design patterns, which are Push mode and Pull mode.

Push mode: the server actively sends data updates to all subscribed clients.

Pull mode: the client is pulled by regular polling.

ZooKeeper uses a combination of push and pull: the client registers the node it needs to pay attention to with the server. Once the data of the node changes, the server will send Watcher event notification to the corresponding client. After receiving this message notification, the client needs to actively go to the server to obtain the latest data. If the configuration information is stored on the ZK for centralized management, usually, the application will take the initiative to obtain the configuration information on the ZK server at startup, and register a Watcher listener on the specified server. In this way, whenever the configuration information changes, the server will notify all subscribed clients in real time to obtain the latest configuration information in real time.

In our usual application system development, we often encounter such requirements: the system needs to use some general configuration information, such as machine list information, runtime switch configuration, database configuration information and so on. These global configuration information typically have the following characteristics:

The amount of data is usually small.

The data content changes at run time

The machines in the cluster are shared and configured consistently.

At this point, the study of "the characteristics, structure and usage of zookeeper" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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

Internet Technology

Wechat

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

12
Report