We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Data Replication Distribution
Free preview: the first 2 parts of this 6-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Data Replication Distribution
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
In a star topology, if the central primary dies, stops for everyone. In a ring, if one node dies, downstream nodes lose data. In hub-and-spoke, the hub is a bottleneck and single point of failure.
What if there was no single point of failure at all? What if every node could directly replicate to every other node?
That's a mesh topology. In a full mesh with N nodes, every node has a direct replication link to every other node. If any single node fails, the remaining N-1 nodes still have direct connections to each other. No data flow is disrupted. No rerouting needed.
This is how CockroachDB, YugabyteDB, and TiDB work internally, every node can communicate directly with every other node. It's also how some enterprise database clusters operate, particularly in financial services where every millisecond of failover time has a cost.
The trade-off is connection count. A full mesh with 5 nodes needs 10 connections (N*(N-1)/2). With 10 nodes, that's 45 connections. With 50 nodes, it's 1,225. The number of connections grows quadratically, which limits practical mesh size.
Full mesh. Every node connects to every other node. Maximum redundancy, maximum connection overhead. Practical for small clusters (3-10 nodes).
Partial mesh. Each node connects to a subset of other nodes. Reduces connection count while maintaining most of the redundancy. If Node A can't reach Node C directly, it can route through Node B. Cassandra's gossip protocol creates a partial mesh where each node communicates with a random subset of peers.
| Aspect | Full Mesh | Partial Mesh |
|---|---|---|
| Connections per node | N-1 | Configurable (typically 3-5) |
| Total connections | N*(N-1)/2 | Much less |
| Fault tolerance | Any single node failure | Depends on connectivity graph |
| Data propagation | 1 hop (direct) | Multiple hops possible |
| Scalability | Limited (~10-20 nodes) | Better (hundreds of nodes) |
How mesh works:
In a full mesh with multi-master replication:
In a partial mesh: