11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ZooKeeper Access Control<br />

Collections API<br />

Parameter <strong>Reference</strong><br />

Command Line Utilities<br />

<strong>Solr</strong>Cloud with Legacy Configuration Files<br />

ConfigSets API<br />

Setting Up an External ZooKeeper Ensemble<br />

Although <strong>Solr</strong> comes bundled with <strong>Apache</strong> ZooKeeper, you should consider yourself discouraged from using this<br />

internal ZooKeeper in production, because shutting down a redundant <strong>Solr</strong> instance will also shut down its<br />

ZooKeeper server, which might not be quite so redundant. Because a ZooKeeper ensemble must have a quorum<br />

of more than half its servers running at any given time, this can be a problem.<br />

The solution to this problem is to set up an external ZooKeeper ensemble. Fortunately, while this process can<br />

seem intimidating due to the number of powerful options, setting up a simple ensemble is actually quite<br />

straightforward, as described below.<br />

How Many ZooKeepers?<br />

"For a ZooKeeper service to be active, there must be a majority of non-failing machines that can<br />

communicate with each other. To create a deployment that can tolerate the failure of F machines,<br />

you should count on deploying 2xF+1 machines. Thus, a deployment that consists of three machines<br />

can handle one failure, and a deployment of five machines can handle two failures. Note that a<br />

deployment of six machines can only handle two failures since three machines is not a majority.<br />

For this reason, ZooKeeper deployments are usually made up of an odd number of machines."<br />

-- ZooKeeper Administrator's <strong>Guide</strong>.<br />

When planning how many ZooKeeper nodes to configure, keep in mind that the main principle for a ZooKeeper<br />

ensemble is maintaining a majority of servers to serve requests. This majority is also called a quorum. It is<br />

generally recommended to have an odd number of ZooKeeper servers in your ensemble, so a majority is<br />

maintained. For example, if you only have two ZooKeeper nodes and one goes down, 50% of available servers<br />

is not a majority, so ZooKeeper will no longer serve requests. However, if you have three ZooKeeper nodes and<br />

one goes down, you have 66% of available servers available, and ZooKeeper will continue normally while you<br />

repair the one down node. If you have 5 nodes, you could continue operating with two down nodes if necessary.<br />

More information on ZooKeeper clusters is available from the ZooKeeper documentation at http://zookeeper.apa<br />

che.org/doc/r3.4.5/zookeeperAdmin.html#sc_zkMulitServerSetup.<br />

Download <strong>Apache</strong> ZooKeeper<br />

The first step in setting up <strong>Apache</strong> ZooKeeper is, of course, to download the software. It's available from http://zo<br />

okeeper.apache.org/releases.html.<br />

When using stand-alone ZooKeeper, you need to take care to keep your version of ZooKeeper updated<br />

with the latest version distributed with <strong>Solr</strong>. Since you are using it as a stand-alone application, it does<br />

not get upgraded when you upgrade <strong>Solr</strong>.<br />

<strong>Solr</strong> currently uses <strong>Apache</strong> ZooKeeper v3.4.6.<br />

Setting Up a Single ZooKeeper<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

556

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!