Multi-Region Architecture
Active-passive vs active-active, data residency, the latency floor you can't optimize away, and cell-based architecture for bounding blast radius.
#Why go multi-region
Four distinct motivations, and they demand different architectures. Establishing which one applies is the first move.
- Latency — users far from your region pay 150–300 ms round trips. No server optimization touches that; only moving data closer does.
- Disaster recovery — an entire region can fail. If that's unacceptable, you need capacity elsewhere.
- Data residency — regulation may require certain users' data to physically stay in a jurisdiction.
- Scale — rare, but some workloads exceed what one region can provide.
#The latency floor
Physics sets the budget, and every design below is a response to this table:
| Route | RTT (real-world) |
|---|---|
| Same AZ | < 1 ms |
| Cross-AZ, same region | 1–2 ms |
| US East ↔ US West | ~60 ms |
| US ↔ Europe | ~80–100 ms |
| US ↔ Asia | ~150–200 ms |
| Antipodal | ~250–300 ms |
Any synchronous cross-region operation costs at least one of these. A write requiring acknowledgment from another continent cannot be fast. That single fact drives everything: either you accept the latency, or you accept weaker consistency.
#The patterns
#Active–passive (warm standby)
One region serves everything; another holds replicated data, ready to take over.
users ──► REGION A (active) ══async replication══► REGION B
(standby)
failover: promote B, repoint DNS/anycastPros: simple, no write conflicts, no distributed transactions, and your application is essentially unchanged. Cons: the standby is idle capacity you pay for; failover is a real, risky operation; async replication means an RPO of seconds. (RPO, recovery point objective, is how much recent data you can lose. Writes the active region accepted but hadn't yet copied to the standby — usually the last few seconds — are lost when it dies.)
Failover is the hard part. Detecting region failure, promoting the database, redirecting traffic, and refilling the standby's empty caches takes 5–30 minutes if practiced and much longer if not.
The detail most designs miss: an untested failover doesn't work. Run regular game days — scheduled drills where you deliberately fail over for real. Otherwise the first real attempt discovers that a DNS TTL is 24 hours, a secret only exists in region A, and the standby database was three days behind.
#Active–active, partitioned writes (the sweet spot)
Both regions serve traffic, but every user (or account, or tenant) is assigned a home region that owns their writes. Reads can be served anywhere; changes always go home. That single rule removes conflicts entirely, because two regions never write the same record.
EU users → EU region (owns EU user data, writes locally)
US users → US region (owns US user data, writes locally)
Cross-region reads are served from async replicas
A EU user's write always routes to the EU regionThis is the pattern to propose for most active-active requirements. Both regions serve traffic and are warm (so failover is proven continuously), writes are local and fast, and — crucially — there are no write conflicts, because a given record has exactly one writer.
Costs: you need routing that knows each entity's home region; a user travelling abroad gets slower writes (usually fine); and cross-entity operations spanning regions need a saga.
This also maps neatly onto data residency — the home region is the compliance boundary.
#Active–active, conflicting writes
Both regions accept writes to the same data. Now you must resolve conflicts:
- Last-write-wins — simple, lossy, and dependent on clocks you can't trust.
- CRDTs — automatic convergence, when the data type allows.
- Application merge — correct, expensive to build for every type.
Only accept this when you truly cannot partition ownership. It's the most expensive option in engineering time and the most likely to produce subtle data bugs.
#Global consensus (Spanner-style)
Synchronous replication across regions via Paxos/Raft. Strong consistency everywhere.
Cost: every write pays a cross-region round trip — 100 ms+ globally, irreducibly. Correct for financial ledgers and global uniqueness constraints; wrong for a social feed.
Note the mitigation these systems use: place all replicas of a shard in nearby regions (e.g. three US regions) so the quorum round trip is 30 ms, not 200 ms — you get regional fault tolerance without paying the global latency.
Amazon Aurora DSQL (generally available May 2025) is a newer take on the same goal, and a useful contrast because it avoids locks entirely. It's a serverless, Postgres-compatible distributed SQL database whose multi-Region clusters are active–active with strong consistency. Two Regions each have a full endpoint you can read and write through, and both behave as one database. A third witness Region stores only the transaction log, not the data. That gives three voters — enough for a majority if one Region fails — without paying for a full third copy.
read: served from a snapshot (MVCC), no locks, no coordination
write: buffered inside the transaction
COMMIT: "adjudicators" check whether anything you read was changed
by a transaction that committed first
no conflict → append to the JOURNAL (the ordered, replicated
log), durable across AZs — and across
Regions for a multi-Region cluster
conflict → abort; the client retries the transactionTwo consequences worth naming. The cross-Region round trip is paid once per transaction, at commit, not once per statement, which is what makes strong consistency across Regions tolerable. And because it uses optimistic concurrency rather than locking, nobody waits on anybody during the transaction. Instead, when two transactions touch the same rows, one of them fails at commit and must be retried — the same contract as serializable snapshot isolation in a single database. Snapshot timestamps depend on closely synchronised clocks (AWS's precision time service), echoing Spanner's reliance on bounded clock uncertainty; see clocks.
#Data strategy
Classify your data — this is the analysis that produces a good design:
| Class | Example | Strategy |
|---|---|---|
| Global, read-mostly | Product catalog, config, feature flags | Replicate everywhere async; stale by seconds is fine |
| User-partitioned | Profiles, posts, orders | Home region per user; replicate for reads |
| Region-local | Sessions, caches, rate limits | Don't replicate at all — regenerate locally |
| Globally consistent | Balances, inventory, usernames | Consensus, or a single authoritative region |
The insight worth stating: most data doesn't need global consistency. Once you separate these classes, only a small core needs the expensive treatment, and everything else can be fast and local.
#Traffic routing
- GeoDNS — the DNS server answers with the IP of the region nearest the asker. Universal, but coarse: it sees the location of the user's DNS resolver (often their ISP's, sometimes in another city or country), not the user. And slow to fail over, because clients and resolvers cache the old answer until its TTL runs out.
- Anycast — every region announces the same IP address, and internet routing (BGP) delivers each user's packets to the nearest one. Fast failover: a failed region simply stops announcing the address, and traffic flows to the next-nearest within seconds. No DNS caching problem.
- Application-level routing — a lightweight global tier redirects to the correct home region. Necessary for partitioned-write architectures, because routing must follow data ownership, not geography.
Capacity is the trap. If region A fails and its traffic moves to region B, does B have room? Two regions each running at 70% cannot absorb each other — the survivor would need to run at 140%. Tolerating single-region failure means running each at ≤50%, which is expensive — and this is exactly the kind of cost reasoning that distinguishes a senior answer. With three regions, a failed region's load splits between two survivors, so each can run at about 66% and keep only ~33% spare. That's why three often beats two.
#Cell-based architecture
The most valuable idea in this topic, and it applies well below multi-region scale.
Instead of one large system per region, run many independent cells, each a complete, self-contained stack serving a slice of users.
REGION
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ CELL 1 │ │ CELL 2 │ │ CELL 3 │ │ CELL 4 │
│ lb·app·db│ │ lb·app·db│ │ lb·app·db│ │ lb·app·db│
│ users A-F│ │ users G-M│ │ users N-S│ │ users T-Z│
└──────────┘ └──────────┘ └──────────┘ └──────────┘
▲ thin routing layer maps user → cellWhy this is powerful:
- Bounded blast radius. A cell failing affects 1/N of users, not all of them. This changes an outage from "the product is down" to "8% of users are affected."
- Deployment safety. Roll out to one cell, watch, then proceed. A bad deploy is contained by construction — and since most outages are caused by change, this addresses the dominant failure cause directly.
- Known scaling unit. You've load-tested one cell, so capacity planning is multiplication rather than guesswork.
- Testable failure. Killing a cell in production is a survivable experiment.
Costs: the routing layer becomes critical (keep it dumb, static, and highly cached); cross-cell operations are awkward; per-cell overhead means lower utilization; and any truly global data must live outside the cells.
Cells & shuffle sharding goes deeper: sizing cells, keeping the router boring, migrating customers between cells, and shuffle sharding to contain a single toxic customer.
#Things that break at multi-region scale
Worth having ready as a checklist:
- Sequential IDs. Two regions generating IDs from a shared sequence requires coordination on every insert. Use UUIDv7 or Snowflake with region-encoded bits.
- Uniqueness constraints. "Unique username" cannot be enforced locally in two regions accepting writes. Either route all registrations through one region, or accept a reconciliation process.
- Caches. Invalidation across regions is asynchronous, so a stale entry can persist in one region after an update in another. Use short TTLs rather than trying to make invalidation synchronous.
- Sessions. Don't replicate them; use signed tokens so any region can validate without shared state.
- Rate limits. A truly global limit means checking with other regions on every single request, adding a cross-region round trip to each one. The usual answer is per-region limits at 1/N of the global budget, accepting imprecision (a user hitting two regions might get slightly more than their limit).
- Cross-region egress cost. Cloud providers charge for data leaving a region. Often a genuinely large line item, and one that is routinely left out of estimates. Replicating everything everywhere is expensive in ways that show up on the bill rather than the diagram.
#Check yourself
Name the four reasons to go multi-region — and why it matters which one.Show answer
Why is an untested failover dangerous?Show answer
What is "active–active with partitioned writes", and why is it the sweet spot?Show answer
When do global consensus stores make sense, and how do they limit latency?Show answer
How do you classify data for a multi-region design?Show answer
Why can't two regions at 70% absorb each other's failure, and why do three regions help?Show answer
What is a cell-based architecture, and what does it buy?Show answer
Name three things that break at multi-region scale.Show answer
#What to carry forward
- Find out why you need multi-region first — latency, disaster recovery, residency or scale need different designs.
- Cross-region round trips are a physical floor: accept the latency or weaker consistency.
- Prefer active–active with a home region per entity; avoid conflicting writes unless ownership can't be partitioned.
- Classify data — most of it doesn't need global consistency — and size regions to absorb a failed one.
- Cells bound the blast radius of failures and deploys, even within one region.