Skip to main content
Lexicon
Lexicon

Chain Replication

Difficulty: Advanced
3 min read

In plain English

Plain definition

Chain Replication orders replicas in a line. A write enters at the head, is applied, and passed to the next node in sequence; it's only considered done once it reaches the last node (the tail). Reads normally come only from the tail, since it has seen every committed write in order, giving strong consistency without needing a voting round on each request.

In Chain Replication, replicas R1...Rn are ordered such that R1 is the head and Rn is the tail. A write is sent to the head, applied, and forwarded to the next node in sequence; only when it reaches the tail is it considered committed and acknowledged back to the client (or up the chain, depending on the variant). Because every node processes writes in the exact same total order dictated by chain position, there is no need for a quorum vote or leader election on the write path itself — ordering is structural, not negotiated. This is fundamentally different from Raft or Paxos, where a leader must collect acknowledgments from a majority before committing; chain replication instead pushes the cost of durability confirmation to a single tail node, freeing intermediate replicas from participating in consensus overhead per-request.

The read path is where the design trade-off becomes explicit: standard Chain Replication only serves reads from the tail, guaranteeing linearizability trivially since the tail has processed every committed write in order and nothing else. This makes reads simple but concentrates read load on one node. The CRAQ (Chain Replication with Apportioned Queries) variant relaxes this by allowing any replica to serve reads, provided it first checks whether it has any in-flight (uncommitted) writes for that object; if clean, it answers locally, otherwise it queries the tail to resolve the pending state. This trades a small amount of read latency in the uncommon case for horizontal read scalability across the whole chain.

Failure handling is the operational crux. Losing the head requires promoting R2 to head and relies on an external, fault-tolerant master or coordination service (for example, a Paxos-based service; CRAQ uses ZooKeeper) to notify clients of the new topology — a configuration change, not a per-request negotiation. When the tail fails, its predecessor becomes the new tail. It already holds all committed writes, and any writes it had not yet committed are treated as committed once it is the tail. The coordination service informs clients. Losing a middle node requires splicing the chain: the predecessor re-sends updates it forwarded that the successor has not received. Nodes retain sent updates until the tail’s acknowledgment propagates back.

  • Throughput profile: write throughput is bound by the slowest link in the chain (pipeline latency), but each node only does O(1) work per write rather than O(n) message fan-out, making it attractive for high-throughput storage backends (for example, FAWN-KV).
  • Latency profile: write latency is O(chain length) sequential hops, which is worse than quorum-based systems for short chains but scales more predictably than the fan-out/fan-in pattern of majority-vote systems as replica count grows.
  • Reconfiguration dependency: the protocol assumes an external, highly available configuration manager for chain topology changes; it does not solve leader election internally, unlike Raft, which bundles consensus and leadership into one mechanism.

The architectural implication is that Chain Replication is best suited for workloads with a clear separation between a low-churn control plane (topology management) and a high-throughput data plane (linear write propagation), and where read scalability can either be sacrificed (vanilla chain) or engineered around via staleness checks (CRAQ). It is a poor fit for systems requiring dynamic, frequent membership changes. In geo-distributed chains the sequential hop latency compounds across wide-area links, which is why CRAQ adds datacenter-aware chain placement and local reads for wide-area deployments.

About this page

Credited to

Dates

Published

Corrections

  • : Corrected during a review of published articles. Details

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

What Is Chain Replication? Definition | KBY Lexicon