The Shapes
Replication copies data across nodes, and the topology is how those copies relate:
- Single leader: one primary accepts writes and streams changes to read only replicas. Simple and conflict free, but the leader is a write bottleneck.
- Multi leader: several nodes accept writes, often one per region, and replicate to each other. Great for write locality, but concurrent edits create conflicts that need resolution.
- Leaderless: any node accepts reads and writes, and clients use quorums to stay consistent. Highly available, but the client carries more logic.
Sync Versus Async
Each link can be synchronous, where the leader waits for the replica to acknowledge before committing, or asynchronous, where it does not. Synchronous gives stronger durability but couples latency to the slowest replica. Most systems use a mix: one synchronous replica for safety and others asynchronous for scale.
Choosing
- Read heavy with one write region: single leader with read replicas.
- Multi region writes that must stay local: multi leader, and budget for conflict handling.
- Maximum availability and you can tune quorums: leaderless.
Key idea
Replication topology trades write simplicity against write locality and availability, and whether each link is synchronous or asynchronous sets the balance between durability and latency.