Hi Kevin,

As Jason mentioned, you can check the shards.preference setting.  Instead
of distribute the requests by replica type,  you can use the replica.leader
option to make query requests goes to all non-leader nodes (TLOG or PULL),
and leader node(TLOG) dedicated to indexing,  exempt from queries.  The
feature is available since 8.10.0.

https://issues.apache.org/jira/browse/SOLR-15472

replica.leader

Prefer replicas based on their leader status, set to either true or false.

Consider a shard with two TLOG replicas and four PULL replicas (six
replicas in total, one of which is the leader). With
shards.preference=replica.leader:false, 5 out of 6 replicas will be
preferred. Contrast this with shards.preference=replica.type:PULL where
only 4 of 6 replicas will be preferred.

Note that the non-leader TLOG replica behaves like a PULL replica from a
search perspective; it pulls index updates from the leader just like a
PULL replica
and does not perform soft-commits. The difference is that the non-leader
TLOG replica also captures updates in its TLOG, so that it is a candidate
to replace the current leader if it is lost.
Thanks,
Wei

On Tue, Aug 27, 2024 at 1:54 PM Kevin Liang (BLOOMBERG/ 919 3RD A) <
klian...@bloomberg.net> wrote:

> No worries, that's helpful. Thanks
>
> From: users@solr.apache.org At: 08/26/24 09:58:00 UTC-4:00To:
> users@solr.apache.org
> Subject: Re: TLOG/PULL query distribution
>
> Hey Kevin,
>
> I hope I'm not replying here too late.
>
> The best docs on this are in the "SolrCloud Distributed Requests" page
> [1]. In short though - by default Solr won't have any preference, it
> does "just" a round-robin or random choice among the healthy replicas
> for each shard.  Users may provide a "shards.preference" parameter to
> tell Solr to prefer replicas meeting various criteria, but there's no
> default value for that.
>
> In terms of the CPU you're observing in your perf test - maybe your
> perf driver is specifying a "shards.preference" param that prioritizes
> PULL replicas?
>
> Best,
>
> Jason
>
> [1]
>
> https://solr.apache.org/guide/solr/latest/deployment-guide/solrcloud-distributed
> -requests.html#shards-preference-parameter
> <https://solr.apache.org/guide/solr/latest/deployment-guide/solrcloud-distributed-requests.html#shards-preference-parameter>
>
> On Thu, Aug 15, 2024 at 5:21 PM Kevin Liang (BLOOMBERG/ 919 3RD A)
> <klian...@bloomberg.net> wrote:
> >
> > Hello,
> >
> > Given a mix of TLOG/PULL nodes in our solr cloud, the behavior I'm
> observing
> from metrics is that CPU load is high for the leader TLOG (indexing) and
> the
> PULL nodes (read queries) however for the most part the other TLOG nodes
> remain
> very underutilized by comparison. My understanding is that TLOG nodes
> replicate
> the same way PULL nodes do (+ transaction log), so they should also be
> available to service read queries no? I'm wondering if anyone knows how
> the
> leader distributes read queries, as I wasn't able to find much in the way
> of
> documentation. Thanks
> >
> > -Kevin
>
>
>

Reply via email to