zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh R <rake...@huawei.com>
Subject Please help me to understand ReadOnly Zookeeper beahviors
Date Thu, 26 Sep 2013 09:10:28 GMT
Hi,

I'm just analyzing the ReadOnlyZKServer and r-o client behaviors.  From the docs I am thinking
of 'read-only' ZooKeeper server is like, it will serves read requests as long as the client
can contact a server.
I've few clarifications about some of its behaviors.  Please take a look at below cases:

case-1
--------
1) Started quorum of three servers and all having r-o mode enabled - zk1, zk2, zk3. Also assume
I've an appln running in zk3 server machine.
2) Make zk3 down. Assume the appln running in zk3 host/machine, has created a zkcilent1 with
r-o true.(As zk3 is down, not aware about zkcilent1 session)
3) After this, say my appln machine got partitioned and assume now zk3 server is restarted.
zkclient1 will be trying to contact zk3 server as both are running in same machine and got
partitioned.

Behavior:
zk3 server is expiring the zkclient1 session as its not aware about its creation. I'm thinking
this is due to a condition in zkserver, zkclient1's zxid is 0x and sametime zk3 server doesn't
know about this zkclient1 session and expiring it.


case-2
---------
1) Started quorum of three servers and all having r-o mode enabled. zk1, zk2, zk3. Also assume
I've an appln running in zk3 server machine.
2) Assume the appln running in zk3 host/machine, has created a zkcilent1 with r-o true.
3) Create ephemeralnode1 using the zkclient1
4) Make zk3 down.
5) Create one more ephemeralnode2 using the zkclient1. (As zk3 is down, it wont be aware about
this)
6) After this, say zk3 server machine got partitioned and assume now zk3 server is restarted.
zkclient1 will be trying to contact zk3 server as both are running in same machine and got
partitioned.

Behavior:
zk3 server is ignoring the zkclient1 connection request saying 'Refusing session request for
client...must try another server'. Zkclient1 remains in CONNECTING state.
This is because, zk3 server is behind the zkclient1 session transaction zxid.


In both the cases, as expected ReadOnlyZKServer is not able to serve the client requests and
user appln would not get the real advantage of CONNECTEDREADONLY in case of partitioning.
Is this the expected behavior of r-o clients ? Also please validate my scenario and I would
appreciate any help.


Thanks & Regards,
Rakesh R

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