Support Questions

Find answers, ask questions, and share your expertise

Solrcloud load balancing

Expert Contributor

Hello

I have a solrcloud of five servers. How should the client applications query solr while ensuring load balancing? For example if the client application is explicitly querying node A and this node gets disconnected, the client application will stop working. Is there a master node i can point to that would distribute queries across the active nodes? Thanks Ahmad

6 REPLIES 6

@suresh kumar c

Can you please help on this?

Contributor

What kind of client do you use? (the client application uses what kind of interface to connect to Solr)

Expert Contributor

im sending http requests to solr from a .net application

Contributor

You can use a load balancer that is built in Solr. In case you have only one shard, you can specify a list of replicas to choose from for a single shard (for load balancing purposes) by using the pipe symbol (|):

http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=localhost:7574/solr/gettingstarted|loc... 

Consult the docs for more comlex scenarios (like more shards): https://cwiki.apache.org/confluence/display/solr/Distributed+Requests

Expert Contributor

But the problem is i am referring to the same server (localhost in your example). My solrcloud is composed of 5 servers, how can i make sure i am querying from the live nodes in case some of them are down?

New Contributor

Hi Amad,

Did you find the solution about this issue? I had exactly as your problem. Can you share to me about your solution?

Thank you