Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change 
notification.

The "ZooKeeper/FAQ" page has been changed by ToddLipcon:
http://wiki.apache.org/hadoop/ZooKeeper/FAQ?action=diff&rev1=15&rev2=16

Comment:
Added FAQ about session expiration behavior after a cluster downtime

  In conclusion, DNS RR works as good as a list of ensemble IP arguments except 
cluster reconfiguration case.
  It turns out that there is a minor problem with DNS RR. If you are using a 
tool such as zktop.py, it does not take care of a list of host IP returned by a 
DNS server. 
  
+ <<BR>>
+ <<Anchor(9)>>
+ '''9. [[#9|What happens to ZK sessions while the cluster is down?]]'''
+ 
+ Imagine that a client is connected to ZK with a 5 second session timeout, and 
the administrator brings the entire ZK cluster down for an upgrade. The cluster 
is down for several minutes, and then is restarted.
+ 
+ In this scenario, the client is able to reconnect and refresh its session. 
Because session timeouts are tracked by the leader, the session starts counting 
down again with a fresh timeout when the cluster is restarted. So, as long as 
the client connects within the first 5 seconds after a leader is elected, it 
will reconnect without an expiration, and any ephemeral nodes it had prior to 
the downtime will be maintained.
+ 
+ The same behavior is exhibited when the leader crashes and a new one is 
elected. In the limit, if the leader is flip-flopping back and forth quickly, 
sessions will never expire since their timers are getting constantly reset.
+ 

Reply via email to