Multi-Leader Topologies: All-to-All
What You'll Learn
You'll understand how the all-to-all (or mesh) topology connects every leader to every other leader in a multi-leader replication setup, and why it's both simple and traffic-intensive.
The Simplest Multi-Leader Topology
In an all-to-all topology (also called a full mesh), every leader replicates its writes directly to every other leader. If you have three data centers each running a leader, each leader maintains replication connections to the other two. With four leaders, each connects to three others, and so on.
Think of it like a group chat where everyone messages everyone else directly—no intermediaries, no hierarchy. Every participant sends their updates to all other participants immediately.
Why All-to-All?
The all-to-all approach is conceptually the simplest multi-leader topology:
- No single point of failure: If any leader goes down, the others continue replicating among themselves
- Lowest latency path: Writes propagate directly between any two leaders without routing through intermediaries
- Easy to understand: The mental model is straightforward—everyone talks to everyone
The Traffic Tradeoff
The major downside is replication traffic volume. With N leaders, each write must be replicated (N-1) times. As you add more leaders (perhaps spreading across many geographic regions), the total network traffic grows quadratically.
With 10 leaders, each write generates 9 replication messages. With 20 leaders, that becomes 19 messages per write. This can overwhelm network capacity and increase costs, especially across expensive inter-region links.
Additionally, all-to-all topologies are most susceptible to causality violations and write conflicts because updates can arrive at different leaders in different orders through multiple paths.
Key Takeaway: All-to-all topology offers simplicity and fault tolerance but generates the highest replication traffic, making it best suited for small numbers of leaders.