Synchronous vs Asynchronous operation

Abimuktheeswaran Chidambaram
2 min readOct 22, 2023

Replication means copying the data from one location to another.

1. Synchronous replication writes the data in primary storage and data is replicated to secondary storage (standby replica) simultaneously. It is used to provide high availability, low latency and automatic failover, in case of disaster recovery, or failure. There is no data loss because it provides the data in real-time. It is expensive because it requires more bandwidth and specialized hardware (depends upon the needs). synchronous replication supports multi-AZ deployment within the region.

Synchronous replication

In the image above, the client sends the request to the source system to write the data as well as to replicate the data in target system simultaneously. Once the process finished, the client received the acknowledgement from both target system and source system.

2.ASynchronous replication writes the data in primary storage and copies the data to the secondary storage (replica) in periodically. It is used to provide scalability in case of backup. There may be a partial data loss. It does not support automatic failover. It is lower in both expensive and bandwidth than synchronous replication. asynchronous replication supports cross-region and serves read replica. data is eventually consistent.

Asynchronous replication

In the image above, the client sends the request to the source system to write the data. Then the source system requests the target system to replicate the data in the target system. once the source system gets acknowledgement, it replicates the data. Once the process finished, the client received the acknowledgement from both target system and source system.

Images credited by https://www.flackbox.com/netapp-snapmirror-engine.

3. Semi-synchronous replication writes the data in primary storage and copies the data to the replica. The primary system get the acknowledgement from the secondary system before it begins the next commitment. It provides high durability. Clients can access the read/write the data in the primary system and read the data in the secondary system within the availability zone.

Thanks for reading!

Last updated: 07-Jan-2024

--

--