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 Otis Gospodnetic <ot...@yahoo.com> on 2007/06/20 17:13:29 UTC

Slave/Master swap

Hi,



I saw https://issues.apache.org/jira/browse/SOLR-265 (Make IndexSchema updateable in live system) which made me think of something I wished for a while back.

Having a single Solr Master and a couple of Solr Slaves is a common setup.  If any of the Slaves fails, a decent LB knows not to talk to it until it's back up.  What happens when the single Solr Master fails?  One (cheap) way to deal with that might be to promote one of the Solr Slaves to the new Master role.  If the snapshooter script is called manually on the Master, the appropriate monitoring tools would need to start the same calls on the new Master (former Slave) box.  But if the snapshooter is configured via solrconfig.xml to run after commit and/or optimize, we'd have to swap solrconfig.xml and restart Solr on the ex-Slave to make it the new Master (and also make some changes in the LB VIPs, most likely).

I'm wondering if there are slicker ways to do this, ways that would minimize the downtime, for instance.  Perhaps, just like Will Johnson is trying to make IndexSchema updateable in a live system, the snapshooter could be turned on/off programatically, say via a special request handler.

Thanks,
Otis




Re: Slave/Master swap

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm wondering if there are slicker ways to do this, ways that would
: minimize the downtime, for instance.  Perhaps, just like Will Johnson is
: trying to make IndexSchema updateable in a live system, the snapshooter
: could be turned on/off programatically, say via a special request
: handler.

and easy way to do that would be to modify the configuration of
RunExecutableListener in the solrconfig.xml to execute a wrapper script
around snapshooter that only runs it if a flag file exists on disk.

the problem is there are other things you typically want differnet between
a master and a slave ... uses of the QuerySenderListener (it could also be
modified to check for flag file i suppose)m cache sizes, and cache
autowarming.



-Hoss