I have 3 Ubuntu vm's fully installed and running with Solr 6.0.1 and external Zookeeper. Solr is running in Cloud mode and is replicating across the 3 nodes via Zookeeper. Data Indexing is replicating across all servers, individual queries run fine on all servers. When I perform a query on Solr01, it is my understanding from Solr documentation that all nodes will be automatically polled and load-balancing is "build in". When I check the logs for Solr02 and Solr03 however, it appears that these servers are not actually getting used. Is my assumption correct about load-balancing and how can I confirm that it is working?
1 Answers
Since you're replicating the same content across all three servers, there is no reason for Solr01 to contact any of the other servers - it already has all the documents it needs to answer your query.
If you're using SolrJ (or another Zookeeper-aware client), it will (if you use the proper client) load balance the reads across all replicas for the index. If you use a client that doesn't support Zookeeper, but supports multiple server addresses, provide all the servers that has the collection you're interested in (i.e. SolrClient([http://solr01, http://solr02, http://solr03])
. If your client only supports a single URL, use a regular loadbalancer (which I also suggest to do even if your client supports providing multiple URLs, as it allows you to remove and add nodes without touching code). There are a large selection of loadbalancers available, such as haproxy, nginx, varnish, Apache, etc.

- 49,529
- 4
- 53
- 84