Single Leader Replication

It is easy to understand. One node becomes a leader and gets all write actions, then sends the updated data to followers. We can read data from the follower

image.png

Multi-leader replication

There is also a way to make multiple leaders and assign followers to them. Ex: For each region, we have leaders and followers

Multi-leader topology:

image.png

  1. Circular topology - A updates B, B updates C, C updates D, etc.

    ✅ Benefits

    ❌ Downsides

  2. Star topology - In a Star Topology, there is one central node that connects to all other nodes, and the peripheral nodes connect only to that central one, not to each other.

🔄 How replication works

There is no direct B → C replication.

c. All-to-All Topology - Every leader replicates directly to every other leader. Most commonly used one