Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load balance SOLR server? Is Redis a good solution? [closed]

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?

like image 767
Henley Avatar asked Jun 24 '11 14:06

Henley


1 Answers

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.

like image 86
Mauricio Scheffer Avatar answered Oct 27 '22 06:10

Mauricio Scheffer