Database Reference
In-Depth Information
environment:java.version=1.7.0_45
[myid:] - INFO [main:Environment@100] - Server
environment:java.vendor=Oracle Corporation
[myid:] - INFO [main:Environment@100] - Server
environment:java.home=/Library/Java/
JavaVirtualMachines/
jdk1.7.0_45.jdk/Contents/Home/jre
Choosing a Quorum Size
During development, a single ZooKeeper server is usually sufficient.
However, for production systems, using a single ZooKeeper server would
introduce a single point of failure. To overcome this, a cluster of servers,
called a quorum, is deployed to provide fault tolerance against the loss of a
single-machine.
An important, often overlooked, aspect of ZooKeeper is that the size of the
cluster can have a large effect on performance. Due to the need to maintain
consensus, as the cluster increases so does the time required for ZooKeeper
to make changes to its state. As a result, there is an inverse relationship
between fault tolerance, in the form of more servers, and performance.
Generally speaking, there is no real reason to have a ZooKeeper cluster
larger than five nodes and, because an even number of servers does not
increase fault tolerance, no reason to have fewer than three nodes. Choosing
either five or three nodes for a cluster is mostly a matter of load on the
cluster. If the cluster is only being lightly utilized for applications such
as leader elections, or it's mostly used for reading configuration, then five
nodes provide more fault tolerance. If the cluster will be heavily utilized, as
can happen when it's used for applications like Kafka (which is discussed
in Chapter 4, “Flow Management for Streaming Analysis”), then the added
performance of only having three nodes is more appropriate.
Monitoring the Servers
ZooKeeper provides two mechanisms for monitoring server components of
the quorum. The first is a simple set of monitoring keywords that can be
accessed over ZooKeeper's assigned ports. The other mechanism is through
the Java Management Extensions (JMX) interface. Although these two
mechanisms overlap in some places, they have some complementary data
that makes both of them useful in a single environment.
Search WWH ::




Custom Search