What is the difference between synchronous and asynchronous Replication

Following are the difference between synchronous and asynchronous Replication.

1. Asynchronous Replication: There is delay between Master and Slave(Secondary). In this data can be replicated after the transaction has been committed on the master. Which means the slave is never ahead of the master. So, in the case of writing it is usually a little behind the master. This delay also called lag.

2. Synchronous Replication:
This method enforces higher rules of consistency. If we decide to replicate data synchronously, the system has to ensure that the data written by the transaction will be at least on two servers at the time of transaction commits.
Which means that the slave does not behind the master and that the data seen by the end users will be identical on both the servers. So, there is no delay in replication. We can call this as online replication.

Conclusion: If we want to make sure that data can never be lost, then we have to switch to synchronous replication.

Leave a Reply

Your email address will not be published. Required fields are marked *