zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Kelly <iv...@apache.org>
Subject Re: What should be the majority in an ensemble for Zookeeper
Date Fri, 04 Apr 2014 17:18:20 GMT
On Thu, Apr 03, 2014 at 11:45:16AM -0700, chaitanya_r wrote:
> "Say that we use four servers for an ensemble. A majority of servers is
> comprised of three servers. However, this system will only tolerate a single
> crash, because a double crash makes the system lose majority. Consequently,
> with four servers, we can only tolerate a single crash, but quorums now are
> larger, which implies that we need more acknowledgments for each request.
> The bottom line is that we should always shoot for an odd number of
> servers."
> How do we select the majority of servers for a given ensemble?
A majority is half the servers plus one. It can be any subset of the
servers in the ensemble. In the case of 4 servers, a majority is any 3
((4/2) + 1) servers. If there were 20 servers in the ensemble, the
majority is 11 ((10/2) + 1). If there are 3 servers, the majority is 2
((3/2) + 1).

The point this paragraph is making is that having an even number of
servers in an ensemble is pointless. You don't increase fault
tolerance, but the number of machines you must communicate with to
agree on an update is higher.

For example, with an ensemble of 3, you have to communicate with 2
machines, and can tolerate 1 failure. With an ensemble of 4, you have
to communicate with _3_ machines, but can still only tolerate 1
failure. With an ensemble of 5, you have to communicate with only 3,
but now you can tolerate 2 failures.


View raw message