I could be wrong, but i dont think preferLocalShards is the default in
multi-shard use cases.

On Wed, Mar 10, 2021 at 9:07 AM Mike Drob <md...@mdrob.com> wrote:

> I believe a server will always try to prefer local cores. Can you do an
> experiment with 3 nodes, and send http queries to the node not hosting any
> replicas? That should confirm the balanced distribution.
>
> If you have multiple shards, the receiving server will forward the requests
> for shards it doesn’t have, but would still prefer local shards when they
> are available.
>
> On Wed, Mar 10, 2021 at 8:00 AM Jan Høydahl <jan....@cominvent.com> wrote:
>
> > Hi,
> >
> > A client has a SolrCloud 8.4 setup with two nodes, and one collection
> with
> > one shard and replicationFactor=2.
> > Of course we want search traffic to be evenly distributed between the two
> > replicas.
> > The client is using plain HTTP requests, no SolrJ or anything fancy, and
> > sends all requests to one of the two nodes.
> > I was expecting Solr to forward about 50% of those requests to the other
> > replica, but it is serving them all locally.
> >
> > I know we can setup an LB in front or re-program the client to do round
> > robin, but that is not my question.
> > Is the select-random-replica logic only active when we have a sharded
> > oollection, and not for a single-shard?
> >
> > Jan
>

Reply via email to