Comparison
Asynchronous replicationvsSynchronous replication
Asynchronous replication
the primary acknowledges your write immediately and ships it to the replicas whenever it gets around to it.
The leader commits and returns without waiting for followers. Writes stay fast and a slow replica cannot stall the primary. The exposure is a window of acknowledged-but-unreplicated writes, which are lost if the leader dies — the size of that window is exactly your replication lag.
Full entry →Synchronous replication
the commit does not return until at least one replica has confirmed it also has the write.
The leader waits for acknowledgement from one or more followers before acknowledging the client. It means a leader failure loses nothing, because a synchronised copy exists. It also means your write latency now includes the slowest required replica's round trip, and that losing enough replicas stalls writes entirely.
Full entry →