How does zookeeper, the registration center in dubbo, perceive service offline?

Zookeeper provides a "heartbeat detection" function, it will periodically send a request to each service provider (actually establish a long socket connection), if there is no response for a long time, the service center thinks that the service provider has "hanged" , And remove it.

The service consumer will monitor the corresponding path of zookeeper. Once there is any change in the data on the path, zookeeper will send the new service list to the consumer, and the consumer will refresh the locally cached list after obtaining the data.

Guess you like

Origin blog.csdn.net/qq_28411869/article/details/95198290