Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

we have two approaches to achieve DB Replication:

  1. Master-Master replication.
  2. Master, 1 Primary Slave, 1 Secondary slave.

I am planning to analyze these two approaches and prepare a comparison report with a recommendation.Currently, I have setup the replication environment using Master-Master replication.

Please provide me some pointers with details analysis.

share|improve this question
up vote 2 down vote accepted

Master-Master approach

+ You can send update queries to any database server.

+ If one Master failed, the other one will be ready to take over.

- You may have data corruption and/or index conflicts if not setup properly.

- You may get inconsistent/incomplete data when one node fails to get updates from the other one. Remember, you will be reading/writing to both servers.

Master-Slave approach

+ No possibility for index conflict. Update is done on one node only.

+ Always, you can get consistent data from the Master and from up-to-date Slave node(s). This can be achieved as far as the application updating the database is behaving as expected!!

- You can send update queries only to the Master node.

- You may need to manually failover to one of the Slave nodes when the Master node fails.

Just a reminder

Doing database replication does not mean that you are doing database backup. The database backup is important to be able to restore a consistent copy of your data when a corruption occurs. In this case, all your replication nodes may have the same corrupted data!!

share|improve this answer
+1 for explanations and reminder. Note that which type of setup you wish to use depends on your load dynamics. As most DB workloads are read-heavy a writable master and N read-only slaves typically works out well. – voretaq7 Dec 3 '10 at 16:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.