Closed ralt closed 5 years ago
Hi,
This was defined in a similar manner as connect_timeout
. The idea being that if you have one server, then the timeout can be the full timeout
(/ 1
). If you have more, then it makes sense to split that, so that the client gets a chance to retry on other servers if the Connect()
request fails.
You are right, this makes sense.
It is also available in the java client (https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java#L1383).
Can you please amend your commit in order to follow the CONTRIBUTING.md guidelines?
@StephenSorriaux does it look good now?
@ralt That is great! Thanks again for your PR.
Thanks for the merge! :+1:
In the case of a zookeeper server under pressure, it will typically try to maintain the quorum rather than handling client requests. In this kind of case, the quorum is maintained, the connection works, but the client is frozen there.
Retrying after a shorter timeout means we can reconnect to another server before losing the session altogether.