zookeeper note

Posted allenhaozi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zookeeper note相关的知识,希望对你有一定的参考价值。

 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的主要内容,如果未能解决你的问题,请参考以下文章

ZooKeeper集群

Zookeeper -- 初识ZookeeperZookeeper的安装和配置Zookeeper命令操作(Zookeeper数据模型 Zookeeper服务端 / 客户端常用命令)

Zookeeper集群部署

zookeeper概述和部署

zookeeper概述和部署

zookeeper概念 zookeeper常用客户端指令 Curator 事件监听 zookeeper分布式锁 ZooKeeper 集群搭建