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 "jacques.cortes" <ja...@laposte.net> on 2012/11/22 17:17:00 UTC

Solr replication

I have 2 Solr servers :
- 1 master
- 1 slave

The master server has a mounted VIP by heartbeat and can toggle on the other
server.

What do you think of the idea to put the same config file on the 2 servers
with master's replication handler url pointing on the vip?




--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replication

Posted by Otis Gospodnetic <ot...@gmail.com>.
Jacques,

The master-slave swapping thing can be made to work, but it's messy.
If you need a third voice to suggest you look at Solr Cloud instead, here
it is: look at Solr Cloud instead.... and use your time for something else.
:)

Otis
--
SOLR Performance Monitoring - http://sematext.com/spm/index.html
Search Analytics - http://sematext.com/search-analytics/index.html




On Mon, Nov 26, 2012 at 4:59 AM, jacques.cortes
<ja...@laposte.net>wrote:

> Thanks Antoine.
>
> In fact, both solr servers are master and slave in config file.
> They have the same config file and replicate from the same master url with
> the vip.
> So, the master is on the server with the vip mounted on.
> And if heartbeat toggle, the role is toggled too.
>
> The question is : what can happend in this configuration?
>
> With tests, I can't see nothing bad, but I don't know the intern mecanisms.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875p4022314.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr replication

Posted by Erick Erickson <er...@gmail.com>.
BTW, when I said "I think to say anything intelligent" I meant "I think for
_me_ to say anything intelligent". Didn't mean to be snarky....

Erick


On Mon, Nov 26, 2012 at 8:19 AM, Erick Erickson <er...@gmail.com>wrote:

> "both servers are master and slave in the config file". So that means
> they're polling each other? I think to say anything intelligent you're
> going to have to provide more data. Please review:
> http://wiki.apache.org/solr/UsingMailingLists.
>
> The bottom line here is that it sounds like what you're trying to do is
> unusual enough that it's not a typical use case. I further suspect that
> what you're trying to do will cause problems you haven't tested for.
>
> So I wouldn't do this. Simply configuring a proper master/slave setup will
> give you HA out of the box. If a master goes down there's some complexity
> in "promoting" one of your slaves and indexing any stale data.
>
> But I'd go with SolrCloud to "fire and forget" rather than try to force
> Master/Slave to do something it wasn't intended to do.
>
> Best
> Erick
>
>
> On Mon, Nov 26, 2012 at 4:59 AM, jacques.cortes <
> jacques.cortes@laposte.net> wrote:
>
>> Thanks Antoine.
>>
>> In fact, both solr servers are master and slave in config file.
>> They have the same config file and replicate from the same master url with
>> the vip.
>> So, the master is on the server with the vip mounted on.
>> And if heartbeat toggle, the role is toggled too.
>>
>> The question is : what can happend in this configuration?
>>
>> With tests, I can't see nothing bad, but I don't know the intern
>> mecanisms.
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875p4022314.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>

Re: Solr replication

Posted by Erick Erickson <er...@gmail.com>.
"both servers are master and slave in the config file". So that means
they're polling each other? I think to say anything intelligent you're
going to have to provide more data. Please review:
http://wiki.apache.org/solr/UsingMailingLists.

The bottom line here is that it sounds like what you're trying to do is
unusual enough that it's not a typical use case. I further suspect that
what you're trying to do will cause problems you haven't tested for.

So I wouldn't do this. Simply configuring a proper master/slave setup will
give you HA out of the box. If a master goes down there's some complexity
in "promoting" one of your slaves and indexing any stale data.

But I'd go with SolrCloud to "fire and forget" rather than try to force
Master/Slave to do something it wasn't intended to do.

Best
Erick


On Mon, Nov 26, 2012 at 4:59 AM, jacques.cortes
<ja...@laposte.net>wrote:

> Thanks Antoine.
>
> In fact, both solr servers are master and slave in config file.
> They have the same config file and replicate from the same master url with
> the vip.
> So, the master is on the server with the vip mounted on.
> And if heartbeat toggle, the role is toggled too.
>
> The question is : what can happend in this configuration?
>
> With tests, I can't see nothing bad, but I don't know the intern mecanisms.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875p4022314.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr replication

Posted by "jacques.cortes" <ja...@laposte.net>.
Thanks Antoine.

In fact, both solr servers are master and slave in config file.
They have the same config file and replicate from the same master url with
the vip.
So, the master is on the server with the vip mounted on.
And if heartbeat toggle, the role is toggled too.

The question is : what can happend in this configuration?

With tests, I can't see nothing bad, but I don't know the intern mecanisms.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875p4022314.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replication

Posted by Antoine LE FLOC'H <le...@gmail.com>.
Jacques,

Being a Solr master or a Solr slave is in the Solr config at start though.
So when the master crashes, you would switch the slave config to a master
config and restart ?
I believe you should look into *SolrCloud* and the leaders/replicas
mecanism that may be doing what you are looking for: "if you happen to kill
one of these, automatic fail over will choose new leaders or a new overseer
transparently to the user"

Antoine.


On Sun, Nov 25, 2012 at 9:50 AM, jacques.cortes
<ja...@laposte.net>wrote:

> Thanks for the response.
>
> My idea is for high availability.
> When the master crashes, the slave becomes master automatically with the
> toggle of the VIP by heartbeat.
> So, the old slave becomes new master without nothing to do.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875p4022242.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr replication

Posted by "jacques.cortes" <ja...@laposte.net>.
Thanks for the response.

My idea is for high availability.
When the master crashes, the slave becomes master automatically with the
toggle of the VIP by heartbeat.
So, the old slave becomes new master without nothing to do.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875p4022242.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replication

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,

Hm, I don't quite follow what you are after.
If you have a master-slave system, then why would the master need to point
to anything/VIP, then it is the slave than polls and pulls from the master?
If anything, you could put the master behind the VIP and then put that VIP
in slave's solrconfig.xml to be used for replication, so you can switch
masters whenever you want to without slave(s) knowing.

Otis
--
SOLR Performance Monitoring - http://sematext.com/spm/index.html
Search Analytics - http://sematext.com/search-analytics/index.html




On Thu, Nov 22, 2012 at 11:17 AM, jacques.cortes <jacques.cortes@laposte.net
> wrote:

> I have 2 Solr servers :
> - 1 master
> - 1 slave
>
> The master server has a mounted VIP by heartbeat and can toggle on the
> other
> server.
>
> What do you think of the idea to put the same config file on the 2 servers
> with master's replication handler url pointing on the vip?
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-replication-tp4021875.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>