concept cluster in category solr

appears as: cluster, clusters, cluster
Solr in Action

This is an excerpt from Manning's book Solr in Action.

We’ve touched on Solr’s approach to scalability and fault tolerance in sections 1.2.6 and 1.2.7. As an architect, you’re probably most curious about the limitations of Solr’s approach to scalability and fault tolerance. First, you should realize that the sharding and replication features in Solr have been improved in Solr 4 to be robust and easier to manage. The new approach to scaling is called SolrCloud. Under the covers, SolrCloud uses Apache ZooKeeper to distribute configurations across a cluster of Solr servers and to keep track of cluster state. Here are highlights of the new SolrCloud features:

A central concept in ZooKeeper is the ephemeral znode, which requires an active client connection to keep the znode alive. If the client application that created the ephemeral znode goes away, the ephemeral znode is automatically deleted by ZooKeeper. When a Solr node joins the cluster, it creates an ephemeral znode under the /live_nodes node. Solr keeps an active connection to this node using the ZooKeeper API. If Solr crashes, the connection to the ephemeral znode is lost, causing that node to be considered gone. When the state of a znode changes, ZooKeeper notifies the other nodes in the cluster that one of the nodes is down. This is important so that Solr doesn’t try to send distributed query requests to the failed node. You can see the ephemeral znodes for the two live Solr servers we started in the previous section in the Cloud panel under the tree view in figure 13.5.

Figure 13.5. Ephemeral znodes created by each Solr instance when it joins the cluster

SolrCloud also depends on a distributed coordination service called Apache ZooKeeper, which we will cover in section 13.2.2. For now, it’s easiest to think of ZooKeeper as an abstract service that manages cluster state and distributes configuration files to nodes joining the cluster. To keep things simple, we’ll run ZooKeeper embedded in the same Java process as Solr.