On Fri, Jan 23, 2009 at 3:57 AM, edre...@ha <edre...@homeaway.com> wrote:
> > Essentially, the plan is to add another Master server, so now we have M1 > and > M2. Both M1 and M2 are also configured to be slaves of each other. The > plan is to put a load balancer in between the Slaves and the Master > servers. What exactly do you mean by that? The slaves never write to the master, do they? > > This way, if M1 goes down, traffic will be routed to M2 automatically. > Once > M1 comes back online, we'll route traffic back to that server. Because M1 > and M2 are replicating each other all updates are captured. > > To test this, I ran the following scenario. > > 1) Slave 1 (S1) is configured to use M2 as it's master. > 2) We push an update to M2. > 3) We restart S1, now pointing to M1. > 4) We wait for M1 to sync from M2 > 5) We then sync S1 to M1. > 6) Success! > How do you co-ordinate all this? > > However... > > M1 and M2 generate snapshots every time they sync to each other, even if no > new data was pushed to them from a Slave. We're concerned about this. > Are you using rsync based replication? The Java based replication does not create snapshots, however it is in 1.4 trunk only. > > Is this even a problem? > Are we stuck in some infinte sync loop between the 2 Master machines? > Will this degrade performance of the Master machines over time? > Is there anything else I should know about this setup? > > Any insights, or alternative suggestions to this setup are quite welcome. > It seems like you are trying to write to Solr directly from your front end application. This is why you are thinking of multiple masters. I'll let others comment on how easy/hard/correct the solution would be. But, do you really need to have live writes? Can they be channeled through a background process? Since you anyway cannot do a commit per-write, the advantage of live writes is minimal. Moreover you would need to invest a lot of time in handling availability concerns to avoid losing updates. If you log/record the write requests to an intermediate store (or queue), you can do with one master (with another host on standby acting as a slave). The switching between the boxes for writes can be done manually. I know it is more manual work but a simpler design and we know it works :) -- Regards, Shalin Shekhar Mangar.