airbnb / synapse

A transparent service discovery framework for connecting an SOA
MIT License
2.07k stars 251 forks source link

Remove on_connected callback to avoid read storm after leader election #295

Closed anson627 closed 5 years ago

anson627 commented 5 years ago

Zookeeper sends connected notification to all clients after leader election, when it recovers from quorum loss.

The reads (to re-enable watcher) triggered by on_connected from single every client, become overwhelming for zookeeper

Until we can enable readonly mode (https://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode), we have to reduce the amount of read.

@Jason-Jian @austin-zhu @Ramyak