码迷,mamicode.com
首页 > 其他好文 > 详细

zookeeper note

时间:2018-12-31 13:54:07      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:list   app   comm   mat   change   ini   family   ssi   handle   

 Session:

   To create a client session the application code must provide a connection string containing a comma separated list of host:port pairs

       host + port 

       If this connection fails, or if the client becomes disconnected from the server for any reason,

       the client will automatically try the next server in the list, until a connection is (re-)established.

 

         Eventually,

     when connectivity between the client and at least one of the servers is re-established,

     the session will either again transition to the "connected" state (if reconnected within the session timeout value)

                            or it will transition to the "expired" state (if reconnected after the session timeout). 

      The ZK client library will handle reconnect for you.

     heartbeat:

        Expirations happens when the cluster does not hear from the client within the specified session timeout period (i.e. no heartbeat)

        At session expiration the cluster will delete any/all ephemeral nodes owned by that session and immediately notify any/all connected clients of the change (anyone watching those znodes)

 

zookeeper note

标签:list   app   comm   mat   change   ini   family   ssi   handle   

原文地址:https://www.cnblogs.com/allenhaozi/p/10201850.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!