[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932502#action_12932502
 ] 

Camille Fournier commented on ZOOKEEPER-922:
--------------------------------------------

If the client connects to another server within whatever the time they set the 
minSessionTimeout to, the client should heartbeat the session and it shouldn't 
get timed out. Otherwise, their session will be expired and they'll get the 
standard expired session scenario. 
If you are working in a setup where you think that unexpected disconnects will 
largely be due to clients crashing and you want ephemeral data aggressively 
removed in that scenario, with this design you set the minSessionTimeout to a 
low value and allow the ZK to quickly timeout those sessions. If you are 
working in a setup where unexpected disconnects are more likely to be due to 
network problems, or you want to give data a longer time to survive, you have 
the option of setting the timeout to a higher value (ideally the same as the 
negotiated session timeout, but that might require a code change to match 
negotiation), which should give the same behavior as now.

> enable faster timeout of sessions in case of unexpected socket disconnect
> -------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-922
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-922
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Camille Fournier
>            Assignee: Camille Fournier
>             Fix For: 3.4.0
>
>         Attachments: ZOOKEEPER-922.patch
>
>
> In the case when a client connection is closed due to socket error instead of 
> the client calling close explicitly, it would be nice to enable the session 
> associated with that client to time out faster than the negotiated session 
> timeout. This would enable a zookeeper ensemble that is acting as a dynamic 
> discovery provider to remove ephemeral nodes for crashed clients quickly, 
> while allowing for a longer heartbeat-based timeout for java clients that 
> need to do long stop-the-world GC. 
> I propose doing this by setting the timeout associated with the crashed 
> session to "minSessionTimeout".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to