Active-Active Geo-Partitioning & Data Sovereignty
Pin rows to regional home shards for GDPR residency, serve global catalogs via follower reads, and keep cross-ocean consensus off the hot write path.
In this lesson (4 bite-sized sections)
Why cross-ocean consensus breaks hot write paths
Physics sets a hard floor on multi-region writes. A network round trip between Virginia and Frankfurt takes 70 to 90 ms, and crossing the Pacific takes 150 to 200 ms. Running synchronous Raft or Paxos consensus across continents puts an intercontinental quorum on every commit, pushing write latency into hundreds of milliseconds and burning lock hold times. Legal rules add a second constraint: data-residency laws such as GDPR or national financial mandates prohibit copying personal records outside approved jurisdictions.
Geo-partitioning: regional home shards vs follower reads
Modern global databases (CockroachDB, Google Cloud Spanner, YugabyteDB) and cell-sharded Postgres solve this with row-level geo-partitioning. Each tenant table carries an explicit region key prefix ((region, tenant_id, record_id)). Placement rules bind the leaseholder and every voting replica of eu rows exclusively to European availability zones, and us rows to US zones. Writes commit across local AZs in 5 to 15 ms while personal records never cross borders.
Sovereign regional home shards with global follower reads: an architecture diagram of 7 components and 7 connections. Full description follows.
- Global Edge Router (Tenant -> Region): load balancer.
- EU App Tier: service, in EU Sovereign Boundary (Frankfurt / Dublin).
- EU Home Shards (3 EU AZs): database, in EU Sovereign Boundary (Frankfurt / Dublin).
- EU Catalog Follower: cache, in EU Sovereign Boundary (Frankfurt / Dublin).
- US App Tier: service, in US Sovereign Boundary (us-east / us-west).
- US Home Shards (3 US AZs): database, in US Sovereign Boundary (us-east / us-west).
- US Catalog Leader: cache, in US Sovereign Boundary (us-east / us-west).
- Global Edge Router (Tenant -> Region) calls synchronously EU App Tier (EU tenant).
- Global Edge Router (Tenant -> Region) calls synchronously US App Tier (US tenant).
- EU App Tier calls synchronously EU Home Shards (3 EU AZs) (Local quorum R/W).
- EU App Tier calls synchronously EU Catalog Follower (Bounded stale read).
- US App Tier calls synchronously US Home Shards (3 US AZs) (Local quorum R/W).
- US App Tier calls synchronously US Catalog Leader (Local read).
- US Catalog Leader replicates to EU Catalog Follower (Async non-PII).
Global non-PII data (currency tables, plan catalogs, feature flags) uses the opposite strategy. Replicate those small tables as non-voting read-only followers in every region and query them with bounded-staleness follower reads (for example reading as of 5 seconds ago). Readers get local sub-5 ms latency without contacting a distant leader. Separating every table in your schema into one of three classes (regional sovereign home-shard, global read-mostly follower table, or local ephemeral cache) is the core multi-region modeling discipline.
Multi-region conflict resolution and cross-region edges
True active-active writes to the same record across regions are necessary only when users on different continents concurrently mutate shared state with no single owner. Never default to wall-clock Last-Write-Wins (LWW) on critical domain records: unsynchronized NTP clocks silently discard concurrent edits. Instead, match the conflict policy to the data: CRDTs for mergeable sets or counters, immutable append-only event logs, or explicit conflict surfacing so application workflows resolve divergent versions deterministically. For strict invariants like account balances or seat inventory, keep a single home leader per entity and pay the cross-ocean hop only when a traveling user touches a foreign shard.
Failover boundaries under residency law
Disaster recovery must respect legal borders too. Failing an EU shard over to a US standby breaks compliance precisely during an incident. Sovereign designs instead span multiple availability zones or paired in-jurisdiction regions (such as Frankfurt and Dublin) for disaster recovery, and keep the global login directory free of raw PII by storing only salted account-identifier hashes mapped to home-region slugs. When a customer relocates permanently from one jurisdiction to another, treat it as an explicit offline migration workflow (export, re-key under the destination region prefix, verify deletion at the old home shard) rather than letting ad-hoc cross-region replication blur legal boundaries.
Sources: CockroachDB Multi-Region Overview · Spanner Multi-Region Instances · YugabyteDB Row-Level Geo-Partitioning
Apply
Your turn
The task this lesson builds to.
Propose a multi-region data architecture for a global HR platform with EU, US, and APAC tenants where employee PII must remain inside its legal region, local writes must finish under 30 ms, and public tax-rule tables are read worldwide.
Think about
- How do you key and place tenant tables so voting replicas never cross legal borders?
- How should global public tax-rule tables be served with single-digit millisecond latency?
- How does failover behave if an entire European data center goes offline?
Draft your design answer here Save your draft, compare against the model answer, and track progress.
Practice
Make it stick
A second problem on the same idea, so it survives past today.
Evaluate an active-active multi-region hotel booking system where European and US travelers concurrently book the same room in Tokyo, and choose between CRDT conflict merging and home-shard routing.
Think about
- Why does active-active LWW or CRDT merging fail on a one-room inventory constraint?
- Which entity defines the natural home shard for a hotel room?
- How do you keep browse latency low while still serializing the final booking write?
Draft your design answer here Save your draft, compare against the model answer, and track progress.