Enrollments Open for Online Instructor-Led Training for Big Data Engineering and Machine Learning | Use Coupon END15 for Extra 15% Off

  Enroll Now

ZooKeeper - Sessions

== Sessions ==

Lets try to understand how do the zookeeper decides to delete ephermals nodes and takes care of session management.

A client has list of servers in the ensemble. The client enumerates over the list and tries to connect to each until it is successful. Server creates a new session for the client. A session has a timeout period - decided by the client. If the server hasn’t received a request within the timeout period, it may expire the session. On session expire, ephermal nodes are deleted. To keep sessions alive client sends pings also known as heartbeats. The client library takes care of heartbeats and session management.

The session remains valid even on switching to another server.

Though the failover is handled automatically by the client library, application can not remain agnostic of server reconnections because the operation might fail during switching to another server.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...