Synchronous vs Asynchronous vs Semi-Synchronous Database Replication | System Design
Differences between synchronous, asynchronous, and semi-synchronous are as follows:
Replication Strategy | Synchronous Replication | Asynchronous Replication | Replication Semi-Synchronous Replication |
---|---|---|---|
Data Consistency |
Ensures data consistency between source and target databases by waiting for target to confirm the receipt of data before the write operation is considered complete |
Does not ensure data consistency as the write operation is considered complete before the data is copied to the target database |
Balances performance and data consistency by waiting for a certain time period or amount of data before copying it to the target database |
Write Operations Performance |
Can slow down write operations as the source database has to wait for the target database to confirm the receipt of data before the write operation is considered complete |
Can increase write operations performance as the write operation is considered complete before the data is copied to the target database |
Balances write operations performance with data consistency
|
Failover Readiness |
High failover readiness as the target database always has the latest data |
Low failover readiness as there might be a delay between the source and target databases |
Moderate failover readiness as data is copied to the target database after a certain time period or amount of data |
Conflict Resolution |
Rarely requires conflict resolution mechanisms as data consistency is ensured |
Requires conflict resolution mechanisms as data consistency is not ensured |
Requires conflict resolution mechanisms as data consistency is not ensured |
Suitable Use Cases |
Suitable for applications where data consistency is critical, such as financial systems |
Suitable for applications where performance is critical and data consistency can be achieved through conflict resolution mechanisms, such as content management systems |
Suitable for applications that require a balance between performance and data consistency, such as e-commerce websites
|
Conclusion: In summary, the application-specific requirements, such as data consistency, performance, and availability, determine the replication mode to be used. Applications, where data consistency is essential, should use synchronous replication, those where performance is crucial but data consistency can be achieved using conflict resolution techniques should use asynchronous replication, and those that need to strike a balance between performance and data consistency should use semi-synchronous replication.
Contact Us