CSE Roadmap

Specialist tier · about 2 hours · 5 parts

Part 2 of 5 · 1 min read

The three topologies, compared

Single-leader, multi-leader, and leaderless differ mainly in how many nodes can accept a write, and what that choice costs.

Think of three different ways a company could handle incoming customer requests. One option is a dedicated intake desk that routes everything in order. Another is several regional desks that occasionally need to reconcile conflicting requests. A third is any available staff member picking up any request directly.

In plain words: single-leader replication designates exactly one node to accept writes, giving a simple, well-defined write order at the cost of that one node becoming a bottleneck and a single point of failure for writes. Multi-leader replication allows more than one node to accept writes, improving write availability and latency for geographically distributed writers, at the cost of needing conflict detection and resolution. Leaderless replication allows any node to accept writes, pushing both the availability benefit and the conflict-handling cost further, while adding a quorum-based mechanism to reason about correctness instead of a designated role.

A worked example. A single global application with one home region fits single-leader well. The same application, if it serves writers who are heavily concentrated in two or three well-separated regions, may fit multi-leader better. A system such as a highly available key-value store, needing every node to stay writable even during a network partition, fits leaderless better than either.

The key lines. No new SQL; the choice between topologies is a system architecture decision, not a per-query SQL concern.

Replication topology

A replication topology is the overall shape of how writes are allowed to reach replicas: through exactly one designated node (single-leader), through several designated nodes (multi-leader), or through any node (leaderless), each shape trading off write availability against the cost of coordinating or resolving conflicting writes.

Example: the intake-desk comparison, one desk versus several versus any available staff member, mirrors the three topologies' shapes.