You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@curator.apache.org by Ronald <hr...@163.com> on 2025/12/17 13:51:50 UTC
Question About ConnectionTimeout and SessionTimeout
hello,I am a curator user.I want to ask some questions about connectionTimeout and sessionTimeout.
First, I want to know why curator use connectionTimeOut.ConnectionTimeout seems no matter with client.start().
It was used in CuratorZookeeperClient::blockUntilConnectedOrTimedOut,this mean connectionTimeout just used for block some operation until successfully connect or timeout?
Second, I want to know how to set connectionTimeouta and sessionTimeout. I see some code comment, and konw sessionTimeout should greater than connectionTimeout.
But I don't know why sessionTimeout should greater than connectionTimeout(Maybe when is not connected , client can't send tick to server until connect again,and if connectTionTimeOut greater than sessionTimeOut, client can connect again but the session is time out?),
and I don't know how much longer should sessionTimeout be than connectionTimeout(May be hava something to do with the number of connectString?)
And I also want to know , is there any disadvantages if the sessionTimeout shorter than connectionTimeout.
Finally, I want to know is there any good article about curator? I recently read curator code, but I don't know its whole behavior,for example client.start(), so I usually feel quite confused.
Thanks!