Topic 142 / Advanced
Multi-region data architecture
Chapter 8.6 · State at Scale
What and why
Replication (→ 72) and quorums (→ 130) were framed within one datacenter's network, where round trips are small; multi-region data architecture asks the same questions — where does the authoritative copy live, how do copies stay correct — when replicas are spread across geographically distant regions, where physical distance itself puts a floor under how fast a round trip can possibly be (the cross-continent figures topic 19 already gave as illustrative order-of-magnitude costs don't improve with better engineering). Builds on: → 72 (replication).
Diagram
Active–passive Active–active
Region A (primary, all writes) Region A ◄──sync/async──► Region B
│ async replication (both accept writes;
▼ conflicts possible, → 134)
Region B (standby, reads only,
promoted on failure → 194/196)
How it works
- Active–passive: one region accepts all writes; another holds a replicated, usually asynchronous, copy and serves only reads (or sits idle) until a failover promotes it — simpler to reason about, but the failover is still a real event with its own risk of losing in-flight writes, the same risk as any leader failover (→ 72).
- Active–active: more than one region accepts writes to the same data, which reintroduces the multi-leader conflict problem (→ 72, → 134) at a larger distance and a larger replication-lag window — concurrent writes from two regions must be detected and resolved exactly as in topic 134, just slower to even notice.
- Region-pinning avoids the active-active conflict problem by routing each piece of data (e.g., by a customer's home region) to exactly one region that owns it — active- active for throughput and locality without active-active's conflict resolution, at the cost of a cross-region hop when a request lands in the wrong region.
- Data residency requirements (data for users in a jurisdiction must stay physically within it) often force region-pinning regardless of the performance trade-off — a legal constraint, not a technical one, that changes which shape is even available.
- Synchronous cross-region replication (waiting for a distant region's acknowledgment before confirming a write) bounds write latency from below by the cross-region round trip (→ 19) — no engineering removes that floor, only how often a given write pays it. Most multi-region designs replicate asynchronously across regions and synchronously only within one, accepting an explicit replication-lag window (→ 72) between regions in exchange for local write latency.
- Boundary, restated precisely: this topic decides where data lives and how it stays consistent across regions; routing a request to the nearest region in steady state is topic 94, and orchestrating a region failover itself is topic 196 — both route to or act on what this topic decided.
Practical example
(illustrative). A service active in two regions pins each customer's data to their signup region to avoid active-active conflicts; a customer's own requests stay single-region and fast. A customer who travels and gets routed to the other region incurs a cross-region read or write to their home region's data — the same cross-continent round trip topic 19 already quantified as an illustrative order-of-magnitude cost, paid deliberately only by the traveling case, not by every request.
When to use it
- Use when: active–passive for disaster recovery and regional-outage survival, not low-latency multi-region writes — the simpler shape and the right default; active– active (ideally region-pinned) when users genuinely need low-latency reads and writes from multiple regions, or regulation requires data to stay local to each one.
- Avoid when: running active–active without a stated conflict-resolution policy (→ 134) for every piece of data writable in more than one region.
- Failure scenarios: a failover promoting a passive replica that was behind on asynchronous replication, losing the last few writes — the same risk as any leader failover (→ 72), just across a longer link; active-active conflicts surfacing only in production because a conflict-resolution policy was never explicitly designed.
- Simpler alternative: a single region with strong intra-region replication and backups (→ 80), accepting regional-outage risk, when the business genuinely doesn't require surviving a whole-region failure.
Practice
(Decision kind — judge scenarios and defend the choice; 20 min, no lab services). For 3 businesses (a single-country invoicing tool with no latency-sensitive users abroad; a global chat application with users on every continent wanting fast message delivery; a healthcare records system with a legal requirement that patient data stay in its country of origin), choose active-passive, active-active, or region-pinned active-active for each, and state the one requirement (latency, availability, or residency) that decided it. Done when each choice names the deciding requirement, not a default preference.
Key takeaway
Multi-region data architecture is active-passive (simple, DR-focused) versus active-active (low-latency everywhere, but reintroduces multi-leader conflicts) versus region-pinning (active-active's locality without its conflicts) — and cross-region physical distance is a hard floor under synchronous write latency that no design choice removes. Done when you can: pick the right shape for a stated latency, availability, and residency requirement, and name the floor topic 19's cross-continent figure puts under synchronous cross-region writes. Used next in → 194, 196.
References
Kleppmann and Riccomini, Designing Data-Intensive Applications — see
references.md.