What is the best of two approaches to achieve DB Replication?

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