Re: master master, repeaters
Ah, thanks for pointing that out. Each indexer needs its own marker for "where is new data in this stream"? This way, when either the primary or secondary starts, it can restart indexing from where it left off. The most reliable way to do this is to search the indexer Solr for its last update. Another problem is that if the backup has a completely different index than the primary, when the query servers switch to the backup they have to download a whole new index. On Mon, Dec 20, 2010 at 12:45 AM, Upayavira wrote: > I've successfully made extensive use of load balancers in sharded, > replicated slave setups - see [1]. > > My question is how that might work with a master. You can have a load > balancer, but you'd need to configure it into a 'fail over but please > don't fail back' configuration. I'm not sure if that is possible on the > load balancers we have used. Otherwise, if your master had a five minute > blip, you could have some content going to your backup, then traffic > returning to your master, leading to master/backup out of sync and > content missing from your master index. > > It seems to me, unless I am missing something, that while a load > balancer can be useful, it is only as a part of a larger scheme when it > comes to master replication. Or am I missing something? > > Upayavira > > [1] http://www.slideshare.net/sourcesense/sharded-solr-setup-with-master > > On Sun, 19 Dec 2010 22:41 -0800, "Lance Norskog" > wrote: >> If you have a load balancer available, that is a much cleaner solution >> than anything else. After the main indexer comes back, you have to get >> the current index state to it to start again. But otherwise >> >> On Sun, Dec 19, 2010 at 10:39 AM, Upayavira wrote: >> > >> > >> > On Sun, 19 Dec 2010 10:20 -0800, "Tri Nguyen" >> > wrote: >> >> How do we tell the slaves to point to the new master without modifying >> >> the config files? Can we do this while the slave is up, issuing a >> >> command to it? >> > >> > I believe this can be done (details are in >> > http://wiki.apache.org/solr/SolrReplication), but I've not actually done >> > it. >> > >> > Upayavira >> > >> >> --- On Sun, 12/19/10, Upayavira wrote: >> >> >> >> >> >> From: Upayavira >> >> Subject: Re: master master, repeaters >> >> To: solr-user@lucene.apache.org >> >> Date: Sunday, December 19, 2010, 10:13 AM >> >> >> >> >> >> We had a (short) thread on this late last week. >> >> >> >> Solr doesn't support automatic failover of the master, at least in >> >> 1.4.1. I've been discussing with my colleague (Tommaso) about ways to >> >> achieve this. >> >> >> >> There's ways we could 'fake it', scripting the following: >> >> >> >> * set up a 'backup' master, as a replica of the actual master >> >> * monitor the master for 'up-ness' >> >> * if it fails: >> >> * tell the master to start indexing to the backup instead >> >> * tell the slave(s) to connect to a different master (the backup) >> >> * then, when the master is back: >> >> * wipe its index (backing up dir first?) >> >> * configure it to be a backup of the new master >> >> * make it pull a fresh index over >> >> >> >> But, Jan Høydahl suggested using SolrCloud. I'm going to follow up on >> >> how that might work in that thread. >> >> >> >> Upayavira >> >> >> >> >> >> On Sun, 19 Dec 2010 00:20 -0800, "Tri Nguyen" >> >> wrote: >> >> > Hi, >> >> > >> >> > In the master-slave configuration, I'm trying to figure out how to >> >> > configure the >> >> > system setup for master failover. >> >> > >> >> > Does solr support master-master setup? From my readings, solr does not. >> >> > >> >> > I've read about repeaters as well where the slave can act as a master. >> >> > When the >> >> > main master goes down, do the other slaves switch to the repeater? >> >> > >> >> > Barring better solutions, I'm thinking about putting 2 masters behind a >> >> > load >> >> > balancer. >> >> > >> >> > If this is not implemented already, perhaps solr can be updated to >> >> > support a >> >> > list of masters for fault tolerance. >> >> > >> >> > Tri >> >> >> > >> >> >> >> -- >> Lance Norskog >> goks...@gmail.com >> > -- Lance Norskog goks...@gmail.com
Re: master master, repeaters
I've successfully made extensive use of load balancers in sharded, replicated slave setups - see [1]. My question is how that might work with a master. You can have a load balancer, but you'd need to configure it into a 'fail over but please don't fail back' configuration. I'm not sure if that is possible on the load balancers we have used. Otherwise, if your master had a five minute blip, you could have some content going to your backup, then traffic returning to your master, leading to master/backup out of sync and content missing from your master index. It seems to me, unless I am missing something, that while a load balancer can be useful, it is only as a part of a larger scheme when it comes to master replication. Or am I missing something? Upayavira [1] http://www.slideshare.net/sourcesense/sharded-solr-setup-with-master On Sun, 19 Dec 2010 22:41 -0800, "Lance Norskog" wrote: > If you have a load balancer available, that is a much cleaner solution > than anything else. After the main indexer comes back, you have to get > the current index state to it to start again. But otherwise > > On Sun, Dec 19, 2010 at 10:39 AM, Upayavira wrote: > > > > > > On Sun, 19 Dec 2010 10:20 -0800, "Tri Nguyen" > > wrote: > >> How do we tell the slaves to point to the new master without modifying > >> the config files? Can we do this while the slave is up, issuing a > >> command to it? > > > > I believe this can be done (details are in > > http://wiki.apache.org/solr/SolrReplication), but I've not actually done > > it. > > > > Upayavira > > > >> --- On Sun, 12/19/10, Upayavira wrote: > >> > >> > >> From: Upayavira > >> Subject: Re: master master, repeaters > >> To: solr-user@lucene.apache.org > >> Date: Sunday, December 19, 2010, 10:13 AM > >> > >> > >> We had a (short) thread on this late last week. > >> > >> Solr doesn't support automatic failover of the master, at least in > >> 1.4.1. I've been discussing with my colleague (Tommaso) about ways to > >> achieve this. > >> > >> There's ways we could 'fake it', scripting the following: > >> > >> * set up a 'backup' master, as a replica of the actual master > >> * monitor the master for 'up-ness' > >> * if it fails: > >> * tell the master to start indexing to the backup instead > >> * tell the slave(s) to connect to a different master (the backup) > >> * then, when the master is back: > >> * wipe its index (backing up dir first?) > >> * configure it to be a backup of the new master > >> * make it pull a fresh index over > >> > >> But, Jan Høydahl suggested using SolrCloud. I'm going to follow up on > >> how that might work in that thread. > >> > >> Upayavira > >> > >> > >> On Sun, 19 Dec 2010 00:20 -0800, "Tri Nguyen" > >> wrote: > >> > Hi, > >> > > >> > In the master-slave configuration, I'm trying to figure out how to > >> > configure the > >> > system setup for master failover. > >> > > >> > Does solr support master-master setup? From my readings, solr does not. > >> > > >> > I've read about repeaters as well where the slave can act as a master. > >> > When the > >> > main master goes down, do the other slaves switch to the repeater? > >> > > >> > Barring better solutions, I'm thinking about putting 2 masters behind a > >> > load > >> > balancer. > >> > > >> > If this is not implemented already, perhaps solr can be updated to > >> > support a > >> > list of masters for fault tolerance. > >> > > >> > Tri > >> > > > > > > -- > Lance Norskog > goks...@gmail.com >
Re: master master, repeaters
If you have a load balancer available, that is a much cleaner solution than anything else. After the main indexer comes back, you have to get the current index state to it to start again. But otherwise On Sun, Dec 19, 2010 at 10:39 AM, Upayavira wrote: > > > On Sun, 19 Dec 2010 10:20 -0800, "Tri Nguyen" > wrote: >> How do we tell the slaves to point to the new master without modifying >> the config files? Can we do this while the slave is up, issuing a >> command to it? > > I believe this can be done (details are in > http://wiki.apache.org/solr/SolrReplication), but I've not actually done > it. > > Upayavira > >> --- On Sun, 12/19/10, Upayavira wrote: >> >> >> From: Upayavira >> Subject: Re: master master, repeaters >> To: solr-user@lucene.apache.org >> Date: Sunday, December 19, 2010, 10:13 AM >> >> >> We had a (short) thread on this late last week. >> >> Solr doesn't support automatic failover of the master, at least in >> 1.4.1. I've been discussing with my colleague (Tommaso) about ways to >> achieve this. >> >> There's ways we could 'fake it', scripting the following: >> >> * set up a 'backup' master, as a replica of the actual master >> * monitor the master for 'up-ness' >> * if it fails: >> * tell the master to start indexing to the backup instead >> * tell the slave(s) to connect to a different master (the backup) >> * then, when the master is back: >> * wipe its index (backing up dir first?) >> * configure it to be a backup of the new master >> * make it pull a fresh index over >> >> But, Jan Høydahl suggested using SolrCloud. I'm going to follow up on >> how that might work in that thread. >> >> Upayavira >> >> >> On Sun, 19 Dec 2010 00:20 -0800, "Tri Nguyen" >> wrote: >> > Hi, >> > >> > In the master-slave configuration, I'm trying to figure out how to >> > configure the >> > system setup for master failover. >> > >> > Does solr support master-master setup? From my readings, solr does not. >> > >> > I've read about repeaters as well where the slave can act as a master. >> > When the >> > main master goes down, do the other slaves switch to the repeater? >> > >> > Barring better solutions, I'm thinking about putting 2 masters behind a >> > load >> > balancer. >> > >> > If this is not implemented already, perhaps solr can be updated to >> > support a >> > list of masters for fault tolerance. >> > >> > Tri >> > -- Lance Norskog goks...@gmail.com
Re: master master, repeaters
On Sun, 19 Dec 2010 10:20 -0800, "Tri Nguyen" wrote: > How do we tell the slaves to point to the new master without modifying > the config files? Can we do this while the slave is up, issuing a > command to it? I believe this can be done (details are in http://wiki.apache.org/solr/SolrReplication), but I've not actually done it. Upayavira > --- On Sun, 12/19/10, Upayavira wrote: > > > From: Upayavira > Subject: Re: master master, repeaters > To: solr-user@lucene.apache.org > Date: Sunday, December 19, 2010, 10:13 AM > > > We had a (short) thread on this late last week. > > Solr doesn't support automatic failover of the master, at least in > 1.4.1. I've been discussing with my colleague (Tommaso) about ways to > achieve this. > > There's ways we could 'fake it', scripting the following: > > * set up a 'backup' master, as a replica of the actual master > * monitor the master for 'up-ness' > * if it fails: > * tell the master to start indexing to the backup instead > * tell the slave(s) to connect to a different master (the backup) > * then, when the master is back: > * wipe its index (backing up dir first?) > * configure it to be a backup of the new master > * make it pull a fresh index over > > But, Jan Høydahl suggested using SolrCloud. I'm going to follow up on > how that might work in that thread. > > Upayavira > > > On Sun, 19 Dec 2010 00:20 -0800, "Tri Nguyen" > wrote: > > Hi, > > > > In the master-slave configuration, I'm trying to figure out how to > > configure the > > system setup for master failover. > > > > Does solr support master-master setup? From my readings, solr does not. > > > > I've read about repeaters as well where the slave can act as a master. > > When the > > main master goes down, do the other slaves switch to the repeater? > > > > Barring better solutions, I'm thinking about putting 2 masters behind a > > load > > balancer. > > > > If this is not implemented already, perhaps solr can be updated to > > support a > > list of masters for fault tolerance. > > > > Tri >
Re: master master, repeaters
How do we tell the slaves to point to the new master without modifying the config files? Can we do this while the slave is up, issuing a command to it? Thanks, Tri --- On Sun, 12/19/10, Upayavira wrote: From: Upayavira Subject: Re: master master, repeaters To: solr-user@lucene.apache.org Date: Sunday, December 19, 2010, 10:13 AM We had a (short) thread on this late last week. Solr doesn't support automatic failover of the master, at least in 1.4.1. I've been discussing with my colleague (Tommaso) about ways to achieve this. There's ways we could 'fake it', scripting the following: * set up a 'backup' master, as a replica of the actual master * monitor the master for 'up-ness' * if it fails: * tell the master to start indexing to the backup instead * tell the slave(s) to connect to a different master (the backup) * then, when the master is back: * wipe its index (backing up dir first?) * configure it to be a backup of the new master * make it pull a fresh index over But, Jan Høydahl suggested using SolrCloud. I'm going to follow up on how that might work in that thread. Upayavira On Sun, 19 Dec 2010 00:20 -0800, "Tri Nguyen" wrote: > Hi, > > In the master-slave configuration, I'm trying to figure out how to > configure the > system setup for master failover. > > Does solr support master-master setup? From my readings, solr does not. > > I've read about repeaters as well where the slave can act as a master. > When the > main master goes down, do the other slaves switch to the repeater? > > Barring better solutions, I'm thinking about putting 2 masters behind a > load > balancer. > > If this is not implemented already, perhaps solr can be updated to > support a > list of masters for fault tolerance. > > Tri
Re: master master, repeaters
We had a (short) thread on this late last week. Solr doesn't support automatic failover of the master, at least in 1.4.1. I've been discussing with my colleague (Tommaso) about ways to achieve this. There's ways we could 'fake it', scripting the following: * set up a 'backup' master, as a replica of the actual master * monitor the master for 'up-ness' * if it fails: * tell the master to start indexing to the backup instead * tell the slave(s) to connect to a different master (the backup) * then, when the master is back: * wipe its index (backing up dir first?) * configure it to be a backup of the new master * make it pull a fresh index over But, Jan Høydahl suggested using SolrCloud. I'm going to follow up on how that might work in that thread. Upayavira On Sun, 19 Dec 2010 00:20 -0800, "Tri Nguyen" wrote: > Hi, > > In the master-slave configuration, I'm trying to figure out how to > configure the > system setup for master failover. > > Does solr support master-master setup? From my readings, solr does not. > > I've read about repeaters as well where the slave can act as a master. > When the > main master goes down, do the other slaves switch to the repeater? > > Barring better solutions, I'm thinking about putting 2 masters behind a > load > balancer. > > If this is not implemented already, perhaps solr can be updated to > support a > list of masters for fault tolerance. > > Tri
master master, repeaters
Hi, In the master-slave configuration, I'm trying to figure out how to configure the system setup for master failover. Does solr support master-master setup? From my readings, solr does not. I've read about repeaters as well where the slave can act as a master. When the main master goes down, do the other slaves switch to the repeater? Barring better solutions, I'm thinking about putting 2 masters behind a load balancer. If this is not implemented already, perhaps solr can be updated to support a list of masters for fault tolerance. Tri