On 3/13/2022 9:23 AM, Sam Lee wrote:
How do I run Apache Solr on two servers such that I will still be able
to index and query even if one of the servers is taken offline? In other
words, I am looking for high availability with automatic failover.

I have looked at SolrCloud. However, it uses Apache ZooKeeper which
requires at least 3 servers to be able to tolerate the failure of 1
server. Are there alternative methods?

I only have two servers that are able to run Solr. Supposing I have a
third low-spec server, is it a good idea to run Solr (SolrCloud) on only
two of the three servers, while running ZooKeeper on all three servers?
However, this looks like a waste because the third server would
essentially be doing nothing. Is there a better method with standalone
Solr?

Zookeeper has fairly low system requirements compared to Solr, so using a third machine with lower specs to just run the tie-breaker ZK is a good way to go.

Note that you'll only have full redundancy at the client level with that setup if your client is ZK-aware.  The only Solr client I know about that's ZK aware is the Java client, which is part of Solr itself as well as being a standalone client.  For full redundancy with HTTP-only clients you'll need a virtual IP address that can be shared among the servers, and have a load balancer listening on the virtual IP.  Setting that up is done with software other than Solr and ZK, so it's not on-topic for this mailing list.  Depending on the capabilities of the third server, it could be the primary for load-balancing as well as the third machine for ZK.  That's what I would do with limited resources.

Thanks,
Shawn

Reply via email to