如何处理客户端会话过期是ZooKeeper在客户端中管理的一个重要问题。

When ZooKeeper detects that a client’s session has expired, it notifies the client and then removes the client’s session from its internal session manager. At this point, ZooKeeper will delete all temporary nodes and watchers associated with the client, and will no longer accept any requests from that client. The client will receive a notification of session expiration and can choose to reconnect to the ZooKeeper server to obtain a new session. After a ZooKeeper session has expired, the client must reconnect to the ZooKeeper server and re-establish all temporary nodes and watchers.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds