The service provider and the service user are independent. The service provider cannot sense the existence of the service user, but coordinates service turnover through zookeeper
When the service provider’s registration address changes, the service user has two options to detect this change
Go to zookeeper every time to get the service provider list, which is obviously perceptible, but not efficient
Use the watch primitive of zookeeperd to monitor a certain znode. Zookeeper will actively notify if there are changes In fact, to put it bluntly, one is pulling and the other is pushing
The service provider and the service user are independent. The service provider cannot sense the existence of the service user, but coordinates service turnover through zookeeper
When the service provider’s registration address changes, the service user has two options to detect this change
Go to zookeeper every time to get the service provider list, which is obviously perceptible, but not efficient
Use the
watch
primitive of zookeeperd to monitor a certain znode. Zookeeper will actively notify if there are changesIn fact, to put it bluntly, one is pulling and the other is pushing