How Leader‑Based Replication Shapes High‑Availability Storage Systems
This article explains the principles of leader‑based and multi‑leader replication, compares synchronous and asynchronous modes, discusses consistency trade‑offs, conflict resolution strategies, and architectural variations for single‑ and multi‑data‑center deployments.
Leader-Based Replication
In a storage system each replica holds a full copy of the data; a leader node receives client writes and replicates them to follower replicas.
s1: A consensus algorithm elects a leader; clients must send write requests to the leader, which forwards requests received by followers.
s2: The leader writes locally and replicates the change (synchronously or asynchronously) to followers in a chosen format (data, log, stream), which apply the writes in the same order.
s3: Clients may read from the leader or any follower replica.
Choosing a replication mode involves consistency decisions: strong consistency requires synchronous replication (full, chained, or semi‑sync), while weaker consistency can use asynchronous replication at the risk of data loss. Trade‑offs affect write latency and read performance.
A single‑leader design also creates a single‑point‑write failure; if the leader becomes unreachable, writes cannot be processed.
Multi-Leader Replication
Extending the model, multiple leaders can accept writes, often called dual‑master or multi‑master replication, commonly used for active‑active deployments across data centers.
In multi‑data‑center setups each center has its own leader that writes locally and asynchronously replicates to leaders in other centers.
Multi‑leader architectures face consistency and write‑conflict challenges. Conflict resolution can be achieved by:
Converting to a logical single‑leader partitioning scheme.
Using timestamp‑based “last‑write‑wins” or version vectors.
Implementing custom application logic to merge conflicting versions.
Communication topologies for multi‑leader replication include All‑to‑All, Circular, and Star (tree) structures, each with different fault‑tolerance and latency characteristics.
Summary
The article reviews leader‑based and multi‑leader replication models, their consistency implications, conflict‑resolution techniques, and architectural variations for single‑ and multi‑data‑center deployments, providing guidance for building highly available storage systems.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Xiaokun's Architecture Exploration Notes
10 years of backend architecture design | AI engineering infrastructure, storage architecture design, and performance optimization | Former senior developer at NetEase, Douyu, Inke, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
