You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by yuliya Feldman <yu...@yahoo.com> on 2012/01/05 23:30:23 UTC

Question regarding ZK behaviour during leader reelection

Hello here,

I have a question regarding ZK clients behaviour during ZK Leader reelection.

We have a situation where server where ZK Leader was running run low on memory and essentially ZK was "frozen" for quite a bit of time.

Meanwhile other 2 ZK servers did reelections among them and new Leader was chosen.

Now on ZK client nodes (not taking "bad" node into consideration) got Disconnect and Closely after Connect events, because as far as I understand no leader was available for about 500 ms. (during reelection).

The question really is - as it is very likely that it will be some time during ZK leader election when none of the ZK servers will be available ZK clients are very likely to "feel" that something happened on the ZK Server (Quorum side).
Which means that ANY application that relies on Zookeeper has to at least handle Disconnect event gracefully.

Are my assumptions correct?

Thanks.

Re: Question regarding ZK behaviour during leader reelection

Posted by yuliya Feldman <yu...@yahoo.com>.
Thanks for quick answer.

I just wanted confirmation. I do handle it, just wanted to confirm that particular behaviour.



________________________________
 From: Camille Fournier <ca...@apache.org>
To: user@zookeeper.apache.org; yuliya Feldman <yu...@yahoo.com> 
Sent: Monday, January 16, 2012 10:39 AM
Subject: Re: Question regarding ZK behaviour during leader reelection
 
Yes your clients always need to handle state changes gracefully, and
absolutely, disconnect will happen when there is a change in leadership.

C

On Mon, Jan 16, 2012 at 1:28 PM, yuliya Feldman <yu...@yahoo.com> wrote:

> Does not look like this question made to a forum.
> Resending it in hope that somebody from ZK developers will answer.
>
> Thanks.
>
>
>
> ________________________________
>  From: yuliya Feldman <yu...@yahoo.com>
> To: "user@zookeeper.apache.org" <us...@zookeeper.apache.org>
> Sent: Thursday, January 5, 2012 2:30 PM
> Subject: Question regarding ZK behaviour during leader reelection
>
> Hello here,
>
> I have a question regarding ZK clients behaviour during ZK Leader
> reelection.
>
> We have a situation where server where ZK Leader was running run low on
> memory and essentially ZK was "frozen" for quite a bit of time.
>
> Meanwhile other 2 ZK servers did reelections among them and new Leader was
> chosen.
>
> Now on ZK client nodes (not taking "bad" node into consideration) got
> Disconnect and Closely after Connect events, because as far as I understand
> no leader was available for about 500 ms. (during reelection).
>
> The question really is - as it is very likely that it will be some time
> during ZK leader election when none of the ZK servers will be available ZK
> clients are very likely to "feel" that something happened on the ZK Server
> (Quorum side).
> Which means that ANY application that relies on Zookeeper has to at least
> handle Disconnect event gracefully.
>
> Are my assumptions correct?
>
> Thanks.
>

Re: Question regarding ZK behaviour during leader reelection

Posted by Camille Fournier <ca...@apache.org>.
Yes your clients always need to handle state changes gracefully, and
absolutely, disconnect will happen when there is a change in leadership.

C

On Mon, Jan 16, 2012 at 1:28 PM, yuliya Feldman <yu...@yahoo.com> wrote:

> Does not look like this question made to a forum.
> Resending it in hope that somebody from ZK developers will answer.
>
> Thanks.
>
>
>
> ________________________________
>  From: yuliya Feldman <yu...@yahoo.com>
> To: "user@zookeeper.apache.org" <us...@zookeeper.apache.org>
> Sent: Thursday, January 5, 2012 2:30 PM
> Subject: Question regarding ZK behaviour during leader reelection
>
> Hello here,
>
> I have a question regarding ZK clients behaviour during ZK Leader
> reelection.
>
> We have a situation where server where ZK Leader was running run low on
> memory and essentially ZK was "frozen" for quite a bit of time.
>
> Meanwhile other 2 ZK servers did reelections among them and new Leader was
> chosen.
>
> Now on ZK client nodes (not taking "bad" node into consideration) got
> Disconnect and Closely after Connect events, because as far as I understand
> no leader was available for about 500 ms. (during reelection).
>
> The question really is - as it is very likely that it will be some time
> during ZK leader election when none of the ZK servers will be available ZK
> clients are very likely to "feel" that something happened on the ZK Server
> (Quorum side).
> Which means that ANY application that relies on Zookeeper has to at least
> handle Disconnect event gracefully.
>
> Are my assumptions correct?
>
> Thanks.
>

Re: Question regarding ZK behaviour during leader reelection

Posted by yuliya Feldman <yu...@yahoo.com>.
Does not look like this question made to a forum.
Resending it in hope that somebody from ZK developers will answer.

Thanks.



________________________________
 From: yuliya Feldman <yu...@yahoo.com>
To: "user@zookeeper.apache.org" <us...@zookeeper.apache.org> 
Sent: Thursday, January 5, 2012 2:30 PM
Subject: Question regarding ZK behaviour during leader reelection
 
Hello here,

I have a question regarding ZK clients behaviour during ZK Leader reelection.

We have a situation where server where ZK Leader was running run low on memory and essentially ZK was "frozen" for quite a bit of time.

Meanwhile other 2 ZK servers did reelections among them and new Leader was chosen.

Now on ZK client nodes (not taking "bad" node into consideration) got Disconnect and Closely after Connect events, because as far as I understand no leader was available for about 500 ms. (during reelection).

The question really is - as it is very likely that it will be some time during ZK leader election when none of the ZK servers will be available ZK clients are very likely to "feel" that something happened on the ZK Server (Quorum side).
Which means that ANY application that relies on Zookeeper has to at least handle Disconnect event gracefully.

Are my assumptions correct?

Thanks.