You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Pramod Srinivasan <pr...@juniper.net> on 2016/04/01 01:54:07 UTC

automatic update of server set at the client on reconfig

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


Re: automatic update of server set at the client on reconfig

Posted by Pramod Srinivasan <pr...@juniper.net>.
Thanks for the info Alex! I will check the code.

________________________________________
From: Alexander Shraer <sh...@gmail.com>
Sent: Thursday, March 31, 2016 10:43 PM
To: user@zookeeper.apache.org
Subject: Re: automatic update of server set at the client on reconfig

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 <pr...@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
>
>

Re: automatic update of server set at the client on reconfig

Posted by Alexander Shraer <sh...@gmail.com>.
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 <pr...@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
>
>