Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # dev >> zookeeper client retry logic..


+
Rakesh R 2012-01-02, 07:08
Copy link to this message
-
Re: zookeeper client retry logic..
It's an interesting idea... can you explain more why you think it
would be good to have a shorter timeout in the case of a longer list
of servers?

Thanks,
C

On Mon, Jan 2, 2012 at 2:08 AM, Rakesh R <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
>
>
> In ClientCnxn, 'readTimeOut' is calculated as follows:
>
>    readTimeOut = sessionTimeOut * 2 / 3; // here it is not considering the server list. If the server list grows more than 3, it will not giving a fair chance to retry to all the servers(in worst case).
>
>
>
> Can we think of changing the 'readTimeOut logic' by using the serverslist.length instead of constant/magic number '3'.
>
>
>
> For example:-
>
> I have 5 servers and client sessionTimeOut=120secs
>
>
>
> readTimeOut = 120 * 2 / 3 and is 80secs
>
>
>
> In this case, the it takes 80secs for the first timeout if the connected server is not responding. This is large time, if we consdier the serverlist, it can retry to next server immediately in <50secs.
>
>
>
>
>
> Thanks & Regards,
>
> Rakesh
>
>
>
>
+
Rakesh R 2012-01-03, 05:36
+
Benjamin Reed 2012-01-03, 18:04
+
Patrick Hunt 2012-01-03, 18:55
+
Thomas Koch 2012-01-03, 14:41