|
@@ -852,7 +852,7 @@ server.3=zoo3:2888:3888</pre>
|
|
|
</ul>
|
|
|
<a name="sc_designing"></a>
|
|
|
<h3 class="h4">Designing a ZooKeeper Deployment</h3>
|
|
|
-<p>The reliablity of ZooKeeper rests on two basic assumptions.</p>
|
|
|
+<p>The reliability of ZooKeeper rests on two basic assumptions.</p>
|
|
|
<ol>
|
|
|
|
|
|
<li>
|
|
@@ -958,7 +958,7 @@ server.3=zoo3:2888:3888</pre>
|
|
|
made to the znodes these changes are appended to a
|
|
|
transaction log, occasionally, when a log grows large, a
|
|
|
snapshot of the current state of all znodes will be written
|
|
|
- to the filesystem. This snapshot supercedes all previous
|
|
|
+ to the filesystem. This snapshot supersedes all previous
|
|
|
logs.
|
|
|
</p>
|
|
|
<p>A ZooKeeper server <strong>will not remove
|
|
@@ -1167,13 +1167,13 @@ server.3=zoo3:2888:3888</pre>
|
|
|
<p>This option will direct the machine to write the
|
|
|
transaction log to the <strong>dataLogDir</strong> rather than the <strong>dataDir</strong>. This allows a dedicated log
|
|
|
device to be used, and helps avoid competition between logging
|
|
|
- and snaphots.</p>
|
|
|
+ and snapshots.</p>
|
|
|
<div class="note">
|
|
|
<div class="label">Note</div>
|
|
|
<div class="content">
|
|
|
|
|
|
<p>Having a dedicated log device has a large impact on
|
|
|
- throughput and stable latencies. It is highly recommened to
|
|
|
+ throughput and stable latencies. It is highly recommended to
|
|
|
dedicate a log device and set <strong>dataLogDir</strong> to point to a directory on
|
|
|
that device, and then make sure to point <strong>dataDir</strong> to a directory
|
|
|
<em>not</em> residing on that device.</p>
|
|
@@ -1215,11 +1215,15 @@ server.3=zoo3:2888:3888</pre>
|
|
|
</dt>
|
|
|
<dd>
|
|
|
<p>(Java system property: <strong>zookeeper.snapCount</strong>)</p>
|
|
|
-<p>ZooKeeper logs transactions to a transaction
|
|
|
- log. After snapCount transactions are written to a log
|
|
|
- file a snapshot is started and a new transaction log
|
|
|
- file is created. The default snapCount is
|
|
|
- 100,000.</p>
|
|
|
+<p>ZooKeeper records its transactions using snapshots and
|
|
|
+ a transaction log (think write-ahead log).The number of
|
|
|
+ transactions recorded in the transaction log before a snapshot
|
|
|
+ can be taken (and the transaction log rolled) is determined
|
|
|
+ by snapCount. In order to prevent all of the machines in the quorum
|
|
|
+ from taking a snapshot at the same time, each ZooKeeper server
|
|
|
+ will take a snapshot when the number of transactions in the transaction log
|
|
|
+ reaches a runtime generated random value in the [snapCount/2+1, snapCount]
|
|
|
+ range.The default snapCount is 100,000.</p>
|
|
|
</dd>
|
|
|
|
|
|
|
|
@@ -1347,17 +1351,16 @@ server.3=zoo3:2888:3888</pre>
|
|
|
</dt>
|
|
|
<dd>
|
|
|
<p>(No Java system property)</p>
|
|
|
-<p>Election implementation to use. A value of "0" corresponds
|
|
|
- to the original UDP-based version, "1" corresponds to the
|
|
|
+<p>Election implementation to use. A value of "1" corresponds to the
|
|
|
non-authenticated UDP-based version of fast leader election, "2"
|
|
|
corresponds to the authenticated UDP-based version of fast
|
|
|
leader election, and "3" corresponds to TCP-based version of
|
|
|
- fast leader election. Currently, algorithm 3 is the default</p>
|
|
|
+ fast leader election. Currently, algorithm 3 is the default.</p>
|
|
|
<div class="note">
|
|
|
<div class="label">Note</div>
|
|
|
<div class="content">
|
|
|
|
|
|
-<p> The implementations of leader election 0, 1, and 2 are now
|
|
|
+<p> The implementations of leader election 1, and 2 are now
|
|
|
<strong> deprecated </strong>. We have the intention
|
|
|
of removing them in the next release, at which point only the
|
|
|
FastLeaderElection will be available.
|
|
@@ -1386,7 +1389,7 @@ server.3=zoo3:2888:3888</pre>
|
|
|
<p>(Java system property: zookeeper.<strong>leaderServes</strong>)</p>
|
|
|
<p>Leader accepts client connections. Default value is "yes".
|
|
|
The leader machine coordinates updates. For higher update
|
|
|
- throughput at thes slight expense of read throughput the leader
|
|
|
+ throughput at the slight expense of read throughput the leader
|
|
|
can be configured to not accept clients and focus on
|
|
|
coordination. The default to this option is yes, which means
|
|
|
that a leader will accept client connections.</p>
|
|
@@ -1418,9 +1421,7 @@ server.3=zoo3:2888:3888</pre>
|
|
|
that each ZooKeeper server has.</p>
|
|
|
<p>There are two port numbers <strong>nnnnn</strong>.
|
|
|
The first followers use to connect to the leader, and the second is for
|
|
|
- leader election. The leader election port is only necessary if electionAlg
|
|
|
- is 1, 2, or 3 (default). If electionAlg is 0, then the second port is not
|
|
|
- necessary. If you want to test multiple servers on a single machine, then
|
|
|
+ leader election. If you want to test multiple servers on a single machine, then
|
|
|
different ports can be used for each server.</p>
|
|
|
</dd>
|
|
|
|
|
@@ -1571,6 +1572,27 @@ server.3=zoo3:2888:3888</pre>
|
|
|
</pre>
|
|
|
</dd>
|
|
|
|
|
|
+
|
|
|
+<dt>
|
|
|
+<term>tcpKeepAlive</term>
|
|
|
+</dt>
|
|
|
+<dd>
|
|
|
+<p>(Java system property: <strong>zookeeper.tcpKeepAlive</strong>)</p>
|
|
|
+<p>
|
|
|
+<strong>New in 3.5.4:</strong>
|
|
|
+ Setting this to true sets the TCP keepAlive flag on the
|
|
|
+ sockets used by quorum members to perform elections.
|
|
|
+ This will allow for connections between quorum members to
|
|
|
+ remain up when there is network infrastructure that may
|
|
|
+ otherwise break them. Some NATs and firewalls may terminate
|
|
|
+ or lose state for long running or idle connections.</p>
|
|
|
+<p> Enabling this option relies on OS level settings to work
|
|
|
+ properly, check your operating system's options regarding TCP
|
|
|
+ keepalive for more information. Defaults to
|
|
|
+ <strong>false</strong>.
|
|
|
+ </p>
|
|
|
+</dd>
|
|
|
+
|
|
|
|
|
|
</dl>
|
|
|
<p></p>
|
|
@@ -1621,6 +1643,18 @@ server.3=zoo3:2888:3888</pre>
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
+<dt>
|
|
|
+<term>zookeeper.superUser</term>
|
|
|
+</dt>
|
|
|
+<dd>
|
|
|
+<p>(Java system property: <strong>zookeeper.superUser</strong>)</p>
|
|
|
+<p>Similar to <strong>zookeeper.X509AuthenticationProvider.superUser</strong>
|
|
|
+ but is generic for SASL based logins. It stores the name of
|
|
|
+ a user that can access the znode hierarchy as a "super" user.
|
|
|
+ </p>
|
|
|
+</dd>
|
|
|
+
|
|
|
+
|
|
|
<dt>
|
|
|
<term>ssl.keyStore.location and ssl.keyStore.password</term>
|
|
|
</dt>
|
|
@@ -2489,7 +2523,7 @@ server.3=zoo3:2888:3888</pre>
|
|
|
|
|
|
|
|
|
<dt>
|
|
|
-<term>incorrect placement of transasction log</term>
|
|
|
+<term>incorrect placement of transaction log</term>
|
|
|
</dt>
|
|
|
<dd>
|
|
|
<p>The most performance critical part of ZooKeeper is the
|
|
@@ -2537,7 +2571,7 @@ server.3=zoo3:2888:3888</pre>
|
|
|
<h3 class="h4">Best Practices</h3>
|
|
|
<p>For best results, take note of the following list of good
|
|
|
Zookeeper practices:</p>
|
|
|
-<p>For multi-tennant installations see the <a href="zookeeperProgrammers.html#ch_zkSessions">section</a>
|
|
|
+<p>For multi-tenant installations see the <a href="zookeeperProgrammers.html#ch_zkSessions">section</a>
|
|
|
detailing ZooKeeper "chroot" support, this can be very useful
|
|
|
when deploying many applications/services interfacing to a
|
|
|
single ZooKeeper cluster.</p>
|