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 Amit Nithian <an...@gmail.com> on 2010/08/16 19:43:38 UTC

Can a Solr Server be both master and slave?

I am not sure if this is the best approach to this problem but I was curious
if a single solr server could be both a master and a slave without causing
index corruption? It seems that you could setup multiple replication
handlers in the SOLR config, /replication /replication2 and have one be
master and another be a slave syncing from another server. Here's why:
1) I want to build an index using data stored in our own local datacenter
generated using M/R and our MySQL DB
2) This index would be synced with a Solr Master sitting in EC2
3) Series of EC2 solr slaves replicate from EC2 Solr master for scaling
purposes.

I figure this would save costs (both time and money) over having all EC2
slaves slave from our datacenter. The index isn't that big but I figure
transferring it once would be best. I was going to setup my local datacenter
process hourly and let it sync accordingly.

Any pitfalls to this?

Thanks
Amit

Re: Can a Solr Server be both master and slave?

Posted by Amit Nithian <an...@gmail.com>.
Ugh I should have checked there first! Thanks for the reply.. that helps a
lot.

Sincerely
Amit

On Mon, Aug 16, 2010 at 10:57 AM, Gora Mohanty <go...@srijan.in> wrote:

> On Mon, 16 Aug 2010 10:43:38 -0700
> Amit Nithian <an...@gmail.com> wrote:
>
> > I am not sure if this is the best approach to this problem but I
> > was curious if a single solr server could be both a master and a
> > slave without causing index corruption? It seems that you could
> > setup multiple replication handlers in the SOLR
> > config, /replication /replication2 and have one be master and
> > another be a slave syncing from another server. Here's why: 1) I
> > want to build an index using data stored in our own local
> > datacenter generated using M/R and our MySQL DB 2) This index
> > would be synced with a Solr Master sitting in EC2 3) Series of
> > EC2 solr slaves replicate from EC2 Solr master for scaling
> > purposes.
> [...]
>
> Have you taken a look at the replication page on the Solr Wiki?
> A repeater seems to address exactly your use case:
> http://wiki.apache.org/solr/SolrReplication#Setting_up_a_Repeater
>
> Regards,
> Gora
>

Re: Can a Solr Server be both master and slave?

Posted by Gora Mohanty <go...@srijan.in>.
On Mon, 16 Aug 2010 10:43:38 -0700
Amit Nithian <an...@gmail.com> wrote:

> I am not sure if this is the best approach to this problem but I
> was curious if a single solr server could be both a master and a
> slave without causing index corruption? It seems that you could
> setup multiple replication handlers in the SOLR
> config, /replication /replication2 and have one be master and
> another be a slave syncing from another server. Here's why: 1) I
> want to build an index using data stored in our own local
> datacenter generated using M/R and our MySQL DB 2) This index
> would be synced with a Solr Master sitting in EC2 3) Series of
> EC2 solr slaves replicate from EC2 Solr master for scaling
> purposes.
[...]

Have you taken a look at the replication page on the Solr Wiki?
A repeater seems to address exactly your use case:
http://wiki.apache.org/solr/SolrReplication#Setting_up_a_Repeater

Regards,
Gora