← Lessons

quiz vs the machine

Silver1080

System Design

Synchronous vs Asynchronous Replication

Whether the leader waits for followers before confirming a write, and what each choice costs.

4 min read · intro · beat Silver to climb

The choice

When a leader accepts a write, it must copy that change to its followers. The question is when the leader tells the client the write succeeded.

  • Synchronous replication means the leader waits until at least one follower confirms it has stored the change before acknowledging the client.
  • Asynchronous replication means the leader acknowledges immediately and ships the change to followers in the background.

The tradeoff

  • Synchronous gives durability: if the leader dies, a confirmed write already lives on a follower. The cost is latency, since the client waits for a round trip, and availability, since a stuck follower can block writes.
  • Asynchronous gives low latency and keeps writing even when followers lag. The risk is data loss: a write the client thinks succeeded can vanish if the leader fails before copying it.

Many systems sit in the middle, confirming after one follower but not all of them.

Key idea

Synchronous replication trades latency for durability, while asynchronous trades durability for speed.

Check yourself

Answer to earn rating on the learn ladder.

1. What does synchronous replication wait for before acknowledging a write?

2. What is the main risk of asynchronous replication?