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

Switch to Threaded View
Zookeeper >> mail # user >> Zookeeper delay  to reconnect

Copy link to this message
Re: Zookeeper delay to reconnect
On Sep 27, 2012, at 2:28 PM, Michi Mutsuzaki <[EMAIL PROTECTED]> wrote:

> Your suggestion sounds reasonable to me. I think the sleep was added
> so that the client doesn't spin when the entire zookeeper is down. The
> client could try to connect to each server without sleep, and sleep
> for 1 second only after failing to connect to all the servers in the
> cluster.

Just for comparison, the kazoo Python client uses an exponential back-off thats customizable and applied after it tries each server in the provided list. It also add's a small jitter to each attempt to prevent herd effects. This also applies to the background read-write searching that takes effect during read-only mode.

- Ben