Sync vs async replication
Sync replication confirms a write only after a follower has it. Async replication confirms at once and copies the write later. When the primary fails for 1 s, async loses 50 confirmed writes and sync loses none, but each sync write waits about 100 ms more.
Quorum 2 of 3 · commit 9.0 ms
W 3 + R 3 of 5 · every read sees the last write
Case 1
Followers apply writes after 100 ms. At 0:40 the primary fails for 1 s. No confirmed write may be lost, and write p99 must stay under 250 ms.
| Measure | Goal | Sync replication | Async replication |
|---|---|---|---|
| Lost writes | none | 0 Pass | 50 Fail |
| Availability (Reads) | at least 100% | 100% Pass | 100% Pass |
| Availability (Writes) | at least 98% | 98.3% Pass | 100% Pass |
| p99 latency (Writes) | under 250 ms | 105 ms Pass | 4.7 ms Pass |
| CPU use | under 80% | 20.3% Pass | 20.3% Pass |
| Monthly cost | 24 USD/mo | 24 USD/mo | |
| Error rate | 1.7% | 0% |