so i recently want to set up a config server using zookeeper (3.4.3), with python client (http://pypi.python.org/pypi/zc-zookeeper-static).
i noticed if i just set up one watch, it’s pretty fast to get the notification that the node changes. but when i try to watch 100 nodes from the same session, it takes about 2 minutes to get notified for some reason. here’s my python script: http://pastebin.com/BC6nKdRV
zookeeper server config is pretty simple:
tickTime=2000
dataDir=/var/lib/zookeeper
clientPort=2181
maxClientCnxns=0
not sure if there’s something i did wrong here. any advice would be great. thx!
turns out it’s the problem with the client. kazoo has no problem with multiple watches per session. i tested with 5000 watches and change notification is still almost instant. https://github.com/python-zk/kazoo