Why is zookeeper's watch listening notification to nodes not permanent?

Alibaba cloud Q & A 2022-02-13 06:04:31 阅读数:477

zookeeper watch listening notification nodes

Zookeeper For nodes watch Why aren't wiretap notifications permanent ?




Take the answer 1:

Why not forever , for instance , If the server changes frequently , In many cases, the listening client , Every change should be notified to all clients , Put a lot of pressure on the network and servers .

It's usually client execution getData(“/ node A”,true), If node A There has been a change or deletion , The client will get it watch event , But after that node A Another change has taken place , And the client has no settings watch event , No more sending to the client .

in application , In many cases , Our client does not need to know every change of the server , I just need the latest data .


copyright:author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130604294354.html