How to implement zookeeper's configuration management (file system, notification mechanism)?

Alibaba cloud Q & A 2022-02-13 06:12:44 阅读数:731

implement zookeeper configuration management file

Zookeeper Configuration management ( file system 、 A notification mechanism ), How to achieve ?

Take the answer 1:

The program is distributed on different machines , Put the configuration information of the program in zk Of znode Next , When a configuration changes , That is to say znode When something changes , By changing zk The contents of a directory node in , utilize watcher Notify each client , To change the configuration .

copyright:author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you.