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 Luke <lu...@gmail.com> on 2021/01/20 13:51:16 UTC

read/write on different node?

Hi,

I have one data collection on 3 shards and 2 replicas, user searches on it.
Also I log all user queries and save to another collection on the same solr
cloud, but user queries are very slow when there are a lot of logs to be
written to the log collection.

any solution for me, please advise. or does solr support separate write
operation on different node and read on other nodes?

Re: read/write on different node?

Posted by Doss <it...@gmail.com>.
Hi,

Master/Slave concept is not there in SolrCloud, but similar thing we can
achive by choosing TLOG + PULL replicas, where writes will happen in TLOG
nodes and the PULL replicas gets the updated segments.

Ensure minimum 2 TLOG nodes as PULL replica notes can't became leader of a
shard.

You can contol the selects to use only PULL replicas by
passing shards.preference=replica.type:PULL

http://ip:port
/solr/indexname/select?q=*:*&shards.preference=replica.type:PULL

- Mohandoss.

On Thu, Jan 21, 2021 at 6:51 PM Luke Oak <lu...@gmail.com> wrote:

> Thanks Mohandoss,
>
> It is realtime inserting and updating if a query is executed. My
> environment is three nodes, 3 shards and 2 replicas.
>
> I noticed there was master slave mode in the old version,  but for solr
> cloud, I don’t know whether it is doable.
>
> Derrick
>
> Sent from my iPhone
>
> > On Jan 21, 2021, at 3:15 AM, Doss <it...@gmail.com> wrote:
> >
> > Hi,
> >
> > You haven't shared information about your environment and how frequently
> > you are commiting the changes, whether your user searching collection
> gets
> > real time inserts / updates etc.,
> >
> > but if you are not doing any real time analysis with the user query
> > information, you can store the information in mysql table and do a batch
> > import(full or delta). If you want the current approach then try
> increasing
> > the commit interval.
> >
> > Recently I have asked the same question and get to know that we can use
> > shards.preference (Replica Types) to achieve our requirement
> >
> https://lucene.472066.n3.nabble.com/Solrcloud-Reads-on-specific-nodes-tp4467568.html
> >
> > - Mohandoss
> >
> >> On Wed, Jan 20, 2021 at 7:22 PM Luke <lu...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> I have one data collection on 3 shards and 2 replicas, user searches on
> it.
> >> Also I log all user queries and save to another collection on the same
> solr
> >> cloud, but user queries are very slow when there are a lot of logs to be
> >> written to the log collection.
> >>
> >> any solution for me, please advise. or does solr support separate write
> >> operation on different node and read on other nodes?
> >>
>

Re: read/write on different node?

Posted by Luke Oak <lu...@gmail.com>.
Thanks Mohandoss,

It is realtime inserting and updating if a query is executed. My environment is three nodes, 3 shards and 2 replicas.  

I noticed there was master slave mode in the old version,  but for solr cloud, I don’t know whether it is doable.

Derrick

Sent from my iPhone

> On Jan 21, 2021, at 3:15 AM, Doss <it...@gmail.com> wrote:
> 
> Hi,
> 
> You haven't shared information about your environment and how frequently
> you are commiting the changes, whether your user searching collection gets
> real time inserts / updates etc.,
> 
> but if you are not doing any real time analysis with the user query
> information, you can store the information in mysql table and do a batch
> import(full or delta). If you want the current approach then try increasing
> the commit interval.
> 
> Recently I have asked the same question and get to know that we can use
> shards.preference (Replica Types) to achieve our requirement
> https://lucene.472066.n3.nabble.com/Solrcloud-Reads-on-specific-nodes-tp4467568.html
> 
> - Mohandoss
> 
>> On Wed, Jan 20, 2021 at 7:22 PM Luke <lu...@gmail.com> wrote:
>> 
>> Hi,
>> 
>> I have one data collection on 3 shards and 2 replicas, user searches on it.
>> Also I log all user queries and save to another collection on the same solr
>> cloud, but user queries are very slow when there are a lot of logs to be
>> written to the log collection.
>> 
>> any solution for me, please advise. or does solr support separate write
>> operation on different node and read on other nodes?
>> 

Re: read/write on different node?

Posted by Doss <it...@gmail.com>.
Hi,

You haven't shared information about your environment and how frequently
you are commiting the changes, whether your user searching collection gets
real time inserts / updates etc.,

but if you are not doing any real time analysis with the user query
information, you can store the information in mysql table and do a batch
import(full or delta). If you want the current approach then try increasing
the commit interval.

Recently I have asked the same question and get to know that we can use
shards.preference (Replica Types) to achieve our requirement
https://lucene.472066.n3.nabble.com/Solrcloud-Reads-on-specific-nodes-tp4467568.html

- Mohandoss

On Wed, Jan 20, 2021 at 7:22 PM Luke <lu...@gmail.com> wrote:

> Hi,
>
> I have one data collection on 3 shards and 2 replicas, user searches on it.
> Also I log all user queries and save to another collection on the same solr
> cloud, but user queries are very slow when there are a lot of logs to be
> written to the log collection.
>
> any solution for me, please advise. or does solr support separate write
> operation on different node and read on other nodes?
>