|
@@ -226,18 +226,6 @@ document.write("Last Published: " + document.lastModified);
|
|
|
<h2 class="h3">Observers: Scaling ZooKeeper Without Hurting Write Performance
|
|
|
</h2>
|
|
|
<div class="section">
|
|
|
-<p>
|
|
|
-
|
|
|
-<em>
|
|
|
- Please note: the Observers feature currently only works with the basic
|
|
|
- leader election protocol, not fast leader election or authenticated fast
|
|
|
- leader election. This will be remedied when a bug in the leader election
|
|
|
- protocol code is fixed in the near future. An exception will be thrown
|
|
|
- if you try to start a cluster containing Observers without
|
|
|
- electionAlg=0. See below for more details.
|
|
|
- </em>
|
|
|
-
|
|
|
-</p>
|
|
|
<p>
|
|
|
Although ZooKeeper performs very well by having clients connect directly
|
|
|
to voting members of the ensemble, this architecture makes it hard to
|
|
@@ -272,32 +260,9 @@ document.write("Last Published: " + document.lastModified);
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
|
-<a name="N10022"></a><a name="sc_UsingObservers"></a>
|
|
|
+<a name="N1001C"></a><a name="sc_UsingObservers"></a>
|
|
|
<h2 class="h3">How to use Observers</h2>
|
|
|
<div class="section">
|
|
|
-<p>
|
|
|
-
|
|
|
-<em>
|
|
|
- Note that
|
|
|
- until <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-578">ZOOKEEPER-578</a>
|
|
|
- is resolved, you must set electionAlg=0 in every server configuration
|
|
|
- file. Otherwise an exception will be thrown when you try to start your
|
|
|
- ensemble.
|
|
|
- </em>
|
|
|
-
|
|
|
-</p>
|
|
|
-<p>
|
|
|
-
|
|
|
-<em>
|
|
|
- The reason: because Observers do not participate in leader elections,
|
|
|
- they rely on voting Followers to inform them of changes to the
|
|
|
- Leader. Currently, only the basic leader election algorithm starts a
|
|
|
- thread that responds to requests from Observers to identify the current
|
|
|
- Leader. Work is in progress on other JIRAs to bring this functionality
|
|
|
- to all leader election protocols.
|
|
|
- </em>
|
|
|
-
|
|
|
-</p>
|
|
|
<p>Setting up a ZooKeeper ensemble that uses Observers is very simple,
|
|
|
and requires just two changes to your config files. Firstly, in the config
|
|
|
file of every node that is to be an Observer, you must place this line:
|
|
@@ -330,7 +295,7 @@ document.write("Last Published: " + document.lastModified);
|
|
|
</div>
|
|
|
|
|
|
|
|
|
-<a name="N10051"></a><a name="ch_UseCases"></a>
|
|
|
+<a name="N1003B"></a><a name="ch_UseCases"></a>
|
|
|
<h2 class="h3">Example use cases</h2>
|
|
|
<div class="section">
|
|
|
<p>
|