There are actually two options for the deployment of solrcloud, so how should we choose in practical development?
The first: When starting the solr server, a Zookeeper server is embedded in it, and then these embedded Zookeeper servers are formed into a cluster.
The second: configure a cluster of the Zookeeper server independently, and then hand over solr to Zookeeper for management
Talk about the first one: every time a solr server is started, a Zookeeper server is embedded in it, which is actually integrating Zookeeper in a server such as tomcat or jetty;
The evaluation of the predecessors in this way:
Pros: Simple to deploy
Disadvantages: High degree of coupling, which is not conducive to expansion. Zookeeper was originally designed to manage the distributed installation of solr, hadoop, hive and other applications. He has his own independent deployment mode, which is embedded in the solr server itself. Not conducive to his expansion.
Unstable: For example, if I want to add nodes one by one to the cluster, I have to add a Zookeeper server at the same time. When a node goes down, I need to restart tomcat. At this time, it is actually equivalent to restarting Zookeeper, which causes The Zookeeper cluster is rather unstable.
For the deployment of this mode, please refer to the official test case of solrCloud: http://wiki.apache.org/solr/SolrCloud/
The second: the advantage is that the above coupling can be avoided and the stability of the entire cluster can be improved, but the disadvantage is that it is a little more troublesome to deploy, but it is very easy to maintain
Please refer to my blog for deployment in this way: http://eksliang.iteye.com/blog/2107002