In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the principle of watcher in Zookeeper". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the principle of watcher in Zookeeper".
Zookeeper provides an efficient and reliable distributed coordination service for distributed applications. Its implementation depends on the ZAB protocol and implements an architecture of active and standby mode to maintain the consistency of data in the cluster. Zookeeper enables distributed applications to be coordinated through a shared tree-structured namespace. It also stores all the data in memory. Any machine in the Zookeeper cluster can respond to the read operations of the client, and all the data exists in memory, so Zookeeper is more suitable for read-based application scenarios.
There are three roles in the cluster: leader,follower,observer. Leader is a machine determined by election, which provides read and write function for the client. Follower and observer can improve the read performance of the cluster without affecting the write performance. The number of Zookeeper cluster nodes is odd. There are three types of nodes: temporary node, persistent node and sequential node. Each node has a stat structure. The most important function is the watcher function.
Watcher:watcher is a core function in ZK. Watcher can monitor changes in the data of directory nodes and changes in subdirectories. Once these states change, the server will notify all watcher set on this directory node, so that each client will quickly know that the state of the directory node it is concerned about has changed and respond accordingly.
Its application scenarios include: unified naming service, cluster management, master election, distributed barrier and so on.
Open source clients are: zkclient, curator.
Https://my.oschina.net/u/3847203/blog/2878240
Thank you for your reading, the above is the content of "the principle of watcher in Zookeeper", after the study of this article, I believe you have a deeper understanding of the principle of watcher in Zookeeper, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.