I am writing a web app that will be hitting a SOLR server frequently. I plan to create multiple instances of this SOLR server so that one specific server doesn't get hit too much. What's the best way to load balance this?
I was thinking of creating a Redis store that would store the number of current requests per SOLR server, and querying on this store to get the SOLR server with the least # of current requests. Of course, I would update this store everytime a request is done.
Is this the best approach? What would you do in this situation?
I'm guessing you already set up Solr replication. Now, since Solr is a standard HTTP application, you can use any generic HTTP load balancer, such as HAProxy or Varnish. See this article on setting up HAProxy with Solr.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With