You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bill Au <bi...@gmail.com> on 2013/03/27 19:51:23 UTC

Solr 4.1 SolrCloud with 1 shard and 3 replicas

I am running Solr 4.1.  I have set up SolrCloud with 1 leader and 3
replicas, 4 nodes total.  Do query requests send to a node only query the
replica on that node, or are they load-balanced to the entire cluster?

Bill

Re: Solr 4.1 SolrCloud with 1 shard and 3 replicas

Posted by Mark Miller <ma...@gmail.com>.
They are load-balanced across the cluster unless you pass the distrib=false param.

- Mark

On Mar 27, 2013, at 2:51 PM, Bill Au <bi...@gmail.com> wrote:

> I am running Solr 4.1.  I have set up SolrCloud with 1 leader and 3
> replicas, 4 nodes total.  Do query requests send to a node only query the
> replica on that node, or are they load-balanced to the entire cluster?
> 
> Bill


Re: Solr 4.1 SolrCloud with 1 shard and 3 replicas

Posted by Bill Au <bi...@gmail.com>.
Thanks for the info, Erik.

I had gone through the tutorial in the SolrCloud Wiki and verified that
queries are load balanced in the two shard cluster with shard replicas
setup.  I was wondering if I need to explicitly specify distrib=false in my
single shard setup.  Glad to see that Solr is doing the right thing by
default in my case.

Bill

ps thanks for a very informative webinar.  I am going to recommend it to my
co-workers once the recording is available


On Wed, Mar 27, 2013 at 3:26 PM, Erik Hatcher <er...@gmail.com>wrote:

> Requests to a node in your example would be answered by that node (no need
> to distribute; it's a single shard system) and it would not internally be
> routed otherwise either.  Ultimately it is up to the client to load-balance
> the initial requests into a "SolrCloud" cluster, but internally in a
> multi-shard distributed search request it will be load balanced beyond that
> initial node.
>
> CloudSolrServer does load balance, so if you're using that client it'll
> "randomly" pick a shard to send to from the client-side.  If you're using
> some other mechanism, it'll request directly to whatever node that you've
> specified directly for that initial request.
>
>         Erik
>
> p.s. Thanks for attending the webinar, Bill!   I saw your name as one of
> the question askers.  Hopefully all that stuff I made up is close to the
> truth :)
>
>
>
> On Mar 27, 2013, at 14:51 , Bill Au wrote:
>
> > I am running Solr 4.1.  I have set up SolrCloud with 1 leader and 3
> > replicas, 4 nodes total.  Do query requests send to a node only query the
> > replica on that node, or are they load-balanced to the entire cluster?
> >
> > Bill
>
>

Re: Solr 4.1 SolrCloud with 1 shard and 3 replicas

Posted by Erik Hatcher <er...@gmail.com>.
Requests to a node in your example would be answered by that node (no need to distribute; it's a single shard system) and it would not internally be routed otherwise either.  Ultimately it is up to the client to load-balance the initial requests into a "SolrCloud" cluster, but internally in a multi-shard distributed search request it will be load balanced beyond that initial node.

CloudSolrServer does load balance, so if you're using that client it'll "randomly" pick a shard to send to from the client-side.  If you're using some other mechanism, it'll request directly to whatever node that you've specified directly for that initial request.

	Erik

p.s. Thanks for attending the webinar, Bill!   I saw your name as one of the question askers.  Hopefully all that stuff I made up is close to the truth :)



On Mar 27, 2013, at 14:51 , Bill Au wrote:

> I am running Solr 4.1.  I have set up SolrCloud with 1 leader and 3
> replicas, 4 nodes total.  Do query requests send to a node only query the
> replica on that node, or are they load-balanced to the entire cluster?
> 
> Bill