Course contentsShow
← Computer Science
Lesson 2646 of 2,87259. Consensus and ReplicationFree lesson

Replication Topologies

Comparing replication topologies including circular, star, and all-to-all configurations for multi-leader systems.

Replication Topologies

What you'll learn: You'll understand how multi-leader replication systems can be organized in different network structures, each with unique trade-offs for propagation speed and complexity.

Core Idea

In multi-leader replication (where multiple nodes accept writes), the topology determines how write operations propagate between leaders. Think of this like choosing how rumor spreads through a friend group: does everyone tell everyone else directly, or does information pass through a chain?

Common Topologies

Circular Topology

Each leader passes writes to exactly one neighbor, forming a ring. Node A sends to B, B to C, C back to A.

Analogy: Like whispering a message around a circle of people—efficient but fragile. If one person leaves, the chain breaks.

  • Pros: Simple, predictable paths
  • Cons: Single point of failure; high latency (writes must traverse entire ring)

Star Topology

One central "root" leader receives all writes and distributes them to other leaders.

Analogy: Like a news anchor broadcasting to regional stations—centralized control but a critical bottleneck.

  • Pros: Simple coordination, easier conflict detection
  • Cons: Root node is single point of failure; scaling limited by root's capacity

All-to-All Topology

Every leader sends writes directly to every other leader.

Analogy: Group chat where everyone messages everyone else—fast but chaotic.

  • Pros: Lowest propagation latency, fault-tolerant (no single point of failure)
  • Cons: Most complex; potential for causality violations if writes arrive out of order

Choosing a Topology

Your choice depends on fault tolerance needs (all-to-all wins), latency requirements (all-to-all for speed), and operational complexity tolerance (circular/star are simpler).

Key Takeaway: Replication topologies determine write propagation paths in multi-leader systems—circular and star are simpler but fragile, while all-to-all offers speed and resilience at the cost of complexity.