zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul K. Harter, Jr." <paul.har...@oracle.com>
Subject RE: SyncLimit and client notifications
Date Thu, 07 Jul 2016 21:05:59 GMT
Camillle, thanks for your response!   If I could burrow a little deeper:

 

I had seen about read-only clients, who can tolerate arbitrarily stale data and that servers
can respond to them when they are isolated from the quorum.  I was actually wondered about
an intermediate case, where, e.g. the leader crashes and a server who is still connected to
the other servers initiates leader election.  Question:

 

These servers can’t do updates until they’ve settled on a new leader, but can they accept
connections or continue to respond to reads, based on their current data??

 

You said that a follower who loses quorum (can no longer see the majority of servers) drops
connections to clients so they know to start trying to reconnect (perhaps except for read-only
clients, which we can ignore  for the moment).  Question:

 

It would seem to make sense that a follower who just loses contact with the leader DOES NOT
drop clients during leader election because and leader election is usually successful and
short enough that it would be too disruptive.  Is this true??

 

Thanks again

paul

 

 

From: Camille Fournier [mailto:camille@apache.org] 
Sent: Thursday, July 07, 2016 1:45 PM
To: user@zookeeper.apache.org
Cc: Paul K. Harter, Jr.
Subject: Re: SyncLimit and client notifications

 

1) Yes, I believe that roughly if the follower doesn't hear from the leader it will go from
state FOLLOWING to state LOOKING, which starts on that server a request for leader election

2) you can have ZK set to support read-only mode, which will allow reads from read-only clients
even when disconnected from quorum, see below.

3) Yes, when the follower loses quorum for whatever reason it will disconnect the clients,
which will get a CONNECTION_LOSS error and start looking for another server to connect to.
I'm actually not sure what happens if you have a client that is in readonlymode connected
to a server that allows readonlymode, perhaps it does not get disconnected at this time but
you'd have to look at the docs.

Read Only Mode Server

(Java system property: readonlymode.enabled)

New in 3.4.0: Setting this value to true enables Read Only Mode server support (disabled by
default). ROM allows clients sessions which requested ROM support to connect to the server
even when the server might be partitioned from the quorum. In this mode ROM clients can still
read values from the ZK service, but will be unable to write values and see changes from other
clients. See ZOOKEEPER-784 for more details.

On Jul 5, 2016 4:50 PM, "Paul K. Harter, Jr." <paul.harter@oracle.com> wrote:

Apologies if this has been discussed previously, but I have a few questions

on the handling of SyncLimit.



1)      does a follower keep track of SyncLimit and initiate election if it
has
not heard from the Leader for SyncLimit, or what triggers Leader Election?

2)      can a follower continue to serve "read" requests during Leader
Election,
or does Leader Election pause all client activity??

3)      does a follower give its clients an explicit notification telling
them to find
another server to help ensure that their sessions do not time out??
If so, when?  SyncLimit??



Thanks



paul


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message