dubbo combines zk to realize automatic discovery of service changes

Mainly relying on the watch mechanism of zookeeper, watch+/dubbo/sericeName
consumers will register a watcher with zk to monitor a certain node, two elements, node path name and callback method.
Zk will maintain a heartbeat with the provider. If the provider loses contact, the corresponding node will be deleted, or a new provider will request zk to establish a new node under a certain serviceName. So /dubbo/serviceName changes, triggering the watch mechanism, and the consumer side refreshes the provider information

Guess you like

Origin blog.csdn.net/qq_41634872/article/details/110877636