If we start a SolrCloud with 2 shards. By a hash function algorithm(Murmur) documents are distributed over 2 shards. It is claimed that we can send the query to any of the cores and it will go to the write shard because the shards know about each other. I want to know how they know about each other?
Asked
Active
Viewed 386 times
1 Answers
1
solr becomes solrcloud with zookeeper ensemble.so its a zookeeper which makes it possible for nodes in the solrcloud to talk to each other.You can think of a zookeeper as a central repository for solrcloud configuration.
Now you can send queries to any node in the cloud,the node will consult the zookeeper to know which other nodes are alive in the shards and distributes the query to all alive nodes in the cluster. Every node in the cluster executes the query and sends results back to the node who distributed the request.The node which was queried will combine the search results returned by all the nodes in the shards and will send back to client.
-
it is not necessary to make zookeeper ensemble to host shards, one zookeeper can also do the job `For reliable ZooKeeper service, you should deploy ZooKeeper in a cluster known as an ensemble. As long as a majority of the ensemble are up, the service will be available` – MYK Jan 23 '14 at 19:37
-
in that case you dont even want to configure zookeeper too.As solrcloud also provides support for running its embedded zookeepers as part of solrcloud deployment. – Jan 24 '14 at 05:27