Thursday, February 01, 2007

Multi-master replication solved with Federated tables?

As many of you may know, MySQL does not support multi-master replication out of the box. Yes, it is possible to come up with a process to handle it, but they're not always the best or the easiest to implement. Well, today I had a thought: could I simulate multi-master replication using Federated tables?

Here's the idea: we have a central server where all inserts will be applied. We then replicate that server to several other servers. On each of the replicated servers, we put a second database that is strictly for making updates to the data. This second database will consist of only federated tables that are linked to the central server. All inserts, updates, and deletes are applied to the second database while all selects would be performed on the first database, which is the replicated data.

Now, I'm not sure how well this will work, but to me it seems like it would be a fairly elegant solution to the problem. Since all of the inserts will technically be occurring on the central server, we don't have to worry about duplicate keys as much.

I'll have to look into this some more...

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home