Hi,
Please see update_addrs() function of the C client, and the following link:
https://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html#ch_reconfig_rebalancing
It could be automated further (e.g., ZOOKEEPER-2016
<https://issues.apache.org/jira/browse/ZOOKEEPER-2016>) but there hasn't
been enough progress
on this. Any contributions very appreciated!
Cheers,
Alex
On Thu, Mar 31, 2016 at 4:54 PM, Pramod Srinivasan <pramod@juniper.net>
wrote:
> Hello Folks
>
> I am playing with reconfig to grow the zookeeper cluster dynamically, what
> I observed is that the C client library (don¹t know about the java client)
> does not automatically reconfigure to the new server set after reconfig.
> So if I go from Zookeeper server set [a, b, c] -> [a] -> [a, d, f] -> [d,
> f, g], the client who was connected to server [a, b, c] will loose
> connectivity to zookeeper and the session will close once we reach [d, f,
> g]. If my application monitors the server config changes and feeds the
> client library with the new server set using zoo_set_servers, the session
> continues to be in connected state. Is this observations correct?
>
> Any reason why the C client library should not automatically reconfigure
> itself with the server set by monitoring the zookeeper config path?
>
> Thanks,
> Pramod
>
>
|