zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bangert <...@groovie.org>
Subject Re: Zookeeper delay to reconnect
Date Fri, 28 Sep 2012 16:34:32 GMT
On Sep 27, 2012, at 2:28 PM, Michi Mutsuzaki <michi@cs.stanford.edu> 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
View raw message