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

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


Copy link to this message
-
zookeeper client retry logic..
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