On Tue, Mar 19, 2013, at 05:10 AM, Abhishek tiwari wrote: > What are the best ways to handle solr master failover in solr 3.6?
Simple answer? Upgrade to 4.x/SolrCloud. Master failover in 3.6 is really not an easy thing to handle. I never worked out a way to automate it. If a master goes down, you can pull the indexes from a slave, back into a replacement master, or you could have a backup master (effectively another slave but with a different purpose). Then, if your master goes down, you would need to tell all of your slaves to replicate from the 'backup master', and point your indexer there. However, should your old master come back up, you need to make sure you don't point indexer/replication to your old master until it has synced its indexes back from the backup master, otherwise you'll loose documents. This is all really painful stuff, that simply cannot be handled elegantly with Solr 3.6. It all comes for free with 4.x and SolrCloud. You'd have to have a very good reason for wanting to go down this route, as it would be a tough road with no guarantees of success. When supporting 3.x based systems, I've just kept the master and a set of slaves, with no backup strategy for the master. I knew I had clones of the index on the slaves which gave me some immunity from disaster, and downtime for indexing is much less catastrophic than downtime for searching, so I probably have enough time to manually rebuild my master using indexes from a slave. Upayavira