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 Prasi S <pr...@gmail.com> on 2014/07/09 06:38:10 UTC

Synchronising two masters

Hi ,
Our solr setup consists of 2 Masters and 2Slaves. The slaves would point to
any one of the Masters through a load balancer and replicate the data.

Master1(M1) is the primary indexer. I send data to M1. In case M1 fails, i
have a failover master, M2 and that would be indexing the data. The problem
is, once the Master1 comes up, how to synchornize M1 and M2? SolrCloud
would the option rather that going with this setup. But, currently we want
it to be implemented in Master-Slave mode.

Any suggestions?
Thanks,
Prasi

Re: Synchronising two masters

Posted by Erick Erickson <er...@gmail.com>.
1> stop all indexing.
2> stop Solr on M1
3> delete M1's data directory
4> temporarily make M1 a slave of M2 and wait for it to sync.
5> make M1 a master again.

But really, this isn't a very good setup. You're wasting a machine that
you could be using. What I'd do is set up a single master and 3 slaves.
If the master goes down, just take one of the slaves and make it a the
master. Now re-index everything that's changed to the new master. That
way you get some value out of the second master, you're using it to
server queries.

Of course this depends upon the ability to re-index from some point in time.
Say your master goes down at 9:00 AM. Say your polling interval is 30 minutes.
Once I'd re-configured things, I'd just re-index from, say, 7:30. It also
depends on your system being able to cope with being slightly stale for
a while.

FWIW,
Erick

On Tue, Jul 8, 2014 at 9:38 PM, Prasi S <pr...@gmail.com> wrote:
> Hi ,
> Our solr setup consists of 2 Masters and 2Slaves. The slaves would point to
> any one of the Masters through a load balancer and replicate the data.
>
> Master1(M1) is the primary indexer. I send data to M1. In case M1 fails, i
> have a failover master, M2 and that would be indexing the data. The problem
> is, once the Master1 comes up, how to synchornize M1 and M2? SolrCloud
> would the option rather that going with this setup. But, currently we want
> it to be implemented in Master-Slave mode.
>
> Any suggestions?
> Thanks,
> Prasi