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 Mark Schoy <he...@gmx.de> on 2011/06/21 09:44:00 UTC

Using two repeater to rapidly switching Master and Slave (Replication)?

Hi,

I have an idea how to switching master and slave in case of one server
is crashing:

Setting up two server as repeater but disabling master and slave
config on both with <str name="enable">false</str>.

Now you can dynamically disable and enable master or slave option by url:

enable / disable replication on master:
http://master_host:port/solr/replication?command=disablereplication
http://master_host:port/solr/replication?command=enablereplication

enable / disable polling on slave:
http://slave_host:port/solr/replication?command=disablepoll
http://slave_host:port/solr/replication?command=enablepoll

Does this work?

Re: Using two repeater to rapidly switching Master and Slave (Replication)?

Posted by stockii <st...@googlemail.com>.
Did your configuration works ?

i have the same issue and i dont know if it works...

i have 2 servers. each with 2 solr instances (one for updates other for
searching) now i need replication from solr1 to solr2. but what the hell do
solr if master crashed ???



-----
------------------------------- System ----------------------------------------

One Server, 12 GB RAM, 2 Solr Instances, 8 Cores, 
1 Core with 45 Million Documents other Cores < 200.000

- Solr1 for Search-Requests - commit every Minute  - 5GB Xmx
- Solr2 for Update-Request  - delta every Minute - 4GB Xmx
--
View this message in context: http://lucene.472066.n3.nabble.com/Using-two-repeater-to-rapidly-switching-Master-and-Slave-Replication-tp3089653p3826234.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Using two repeater to rapidly switching Master and Slave (Replication)?

Posted by Erick Erickson <er...@gmail.com>.
It should, but there are a couple of issues.
1> you have to make your remaining slaves poll the new master for index updates.
2> your indexing process has to be pointed the new master (if it's external)
3> you have to make sure anything you've indexed to the master that has NOT
     been replicated to the new master gets re-indexed. This is often done by
     just re-indexing everything from, say, an hour before the master crashed.

Best
Erick

On Tue, Jun 21, 2011 at 3:44 AM, Mark Schoy <he...@gmx.de> wrote:
> Hi,
>
> I have an idea how to switching master and slave in case of one server
> is crashing:
>
> Setting up two server as repeater but disabling master and slave
> config on both with <str name="enable">false</str>.
>
> Now you can dynamically disable and enable master or slave option by url:
>
> enable / disable replication on master:
> http://master_host:port/solr/replication?command=disablereplication
> http://master_host:port/solr/replication?command=enablereplication
>
> enable / disable polling on slave:
> http://slave_host:port/solr/replication?command=disablepoll
> http://slave_host:port/solr/replication?command=enablepoll
>
> Does this work?
>