On top of Ben's description, you probably need to set initLimit to
several minutes to transfer 700MB (worst case). The value of
syncLimit, however, does not need to be that large.
-Flavio
On Mar 15, 2010, at 7:24 PM, Benjamin Reed wrote:
it is a bit confusing but initLimit is the timer that is used when a
follower connects to a leader. there may be some state transfers
involved to bring the follower up to speed so we need to be able to
allow a little extra time for the initial connection.
after that we use syncLimit to figure out if a leader or follower is
dead. a peer (leader or follower) is considered dead if syncLimit
ticks
goes by without hearing from the other machine. (this is after the
initial connection has been made.)
please open a jira to made the text a bit more explicit. feel free to
add suggestions :)
thanx
ben
On 03/15/2010 04:17 AM, Michael Bauland wrote:
Hi Patrick,
I'm also setting up a Zookeeper ensemble across three different
locations and I've got some questions regarding the parameters as
specified on the page you mentioned:
That's controlled by the "tickTime"/synclimit/initlimit/etc.. see
more
about this in the admin guide: http://bit.ly/c726DC
- What's the difference between initLimit and syncLimit? For
initLimit
it says this is the time "to allow followers to connect and sync to a
leader," and syncLimit is the time "to allow followers to sync with
ZooKeeper". To me this sounds very similar, since "Zookeeper" in the
second definition probably means the Zookeeper leader, doesn't it?
- When I connect with a client to the Zookeeper ensemble I provide
the
three IP addresses of my three Zookeeper servers. Does the client
then
choose one of them arbitrarily or will it always try to connect to
the
first one first? I'm asking since I would like to have my clients
first
try to connect to the local Zookeeper server and only if that fails
(for
whatever reason, maybe it's down) it should try to connect to one
of the
servers on a different physical location.
You'll want to increase from the defaults since those are
typically for
high performance interconnect (ie within colo). You are correct
though,
much will depend on your env. and some tuning will be involved.
Do you have any suggestions for the parameters? So far I left
tickTime
at 2 sec and increased initLimit and syncLimit to 30 (i.e., one
minute).
Our sites are connected with 1Gbit to the Internet, but of course we
have no influence on what's in between. The data managed by
zookeeper is
quite large (snapshots are 700 MByte, but they may increase in the
future).
Thanks for your help,
Michael