0

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.

1 Answer 1

2

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!!

1
  • +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, 2010 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .