1. What It Is
A single region is a single point of failure for the whole product, so the real question is how far beyond it to go. Multi-region architecture places compute and data in several geographic regions, and disaster recovery (DR) is the plan and machinery that restores service when a region, or the data inside it, is lost. We start from two numbers, then buy only as much redundancy as they require.
What:
A set of design choices covering how data reaches a second region (backup, async or sync replication), how traffic moves when a region fails, and how the team proves the whole path works before a real disaster.
Primary purpose:
Keep data loss within the RPO and downtime within the RTO when a region fails, while also giving distant users a nearby region and keeping regulated data where the law requires.
Usually used for:
Payments and ledgers, global SaaS and file storage, content delivery, any system with a regional availability SLA, and any product with data residency obligations.
2. Core Mental Model
Keep three questions apart, because candidates blur them. How much data can we lose is the RPO, how long can we be down is the RTO, and how much does one failure take with it is the blast radius. They are independent, so synchronous replication can give an RPO of 0 while a manual rebuild still gives an RTO of hours.
ποΈ RPO (data loss)
Recovery point objective, the maximum data loss measured as time. It is set by how data reaches the second region, so it is a data path decision made through backup cadence, replication mode, and lag.
β±οΈ RTO (downtime)
Recovery time objective, the maximum downtime. It is set by how much is already running and how automated the cutover is, so it is a compute and traffic decision made through standby capacity, health checks, TTLs, and runbooks.
π₯ Blast radius
The share of customers one failure or bad deploy can hurt. Regional isolation and cells shrink it, and a small blast radius often helps more than a faster failover.
In the room
Ask for RPO and RTO per tier before drawing any region, then pick the cheapest of the four DR tiers that meets both. Say out loud which data you refuse to make active-active, which is usually money and inventory, and why.
3. Why It Matters in HLD
Every HLD prompt with an availability target, a global user base, or regulated data eventually asks "what if the whole region goes away?" Three lenses:
Needed When:
A regional outage, bad config push, or corrupted data would breach the SLA, users are spread across continents, or the law keeps certain data inside a jurisdiction.
Avoids:
Whole-product outages from one region, unrecoverable data loss, a failover path nobody has ever run, and legal exposure from data crossing borders.
Optimizes For:
Bounded RPO and RTO per tier, latency to the nearest region, and the smallest blast radius per dollar of redundancy.
4. Architecture & Data Flow
Walk a regional failure as interview steps. Step 1 (route): users resolve one global name to the nearest healthy region through GeoDNS or anycast, with health probes from several vantage points. Step 2 (write): the write commits in the key's home region or the single primary region, or on a majority of three regions when the RPO must be 0. Step 3 (replicate): the change streams to the other region, and the lag is your RPO exposure. Step 4 (detect and decide): repeated probe failures open a decision gate that is automated for tight RTOs and human approved for loose ones. Step 5 (fence, then promote): a majority including the witness agrees, the old primary is fenced, and the replica is promoted with a higher epoch. Step 6 (shift traffic): DNS weights flip and clients drain over the TTL. Step 7 (verify): smoke tests run, and failback happens later as a planned event.
Failover timeline
The timeline below is the RTO budget. Thirty seconds of detection, about 20 seconds to vote, fence, promote, and flip DNS, and a 60 second TTL add up to about 110 seconds, as a best case for a fully automated warm standby whose capacity can already take the first wave of traffic. Scaling the standby to full size is a separate step that can take minutes, so it overlaps with the DNS drain and is not counted in the 110 seconds. A human who must be paged, decide, and approve adds minutes to tens of minutes, and a pilot light adds more because compute must be created first. That is why the tier table below quotes a longer RTO of about 15 minutes for warm standby. The shape matches the automated runbook in the Backup and Disaster Recovery problem, which budgets about 3 minutes end to end with its own timings and smoke tests.
In the room
Narrate the order as detect, agree, fence, promote, route, verify. Interviewers listen for fence before promote, because promoting without fencing is exactly how split brain starts.
5. Key Characteristics
Each choice below moves the RPO, the RTO, or the cost, so we compare them in a fixed order: the RPO arithmetic, the four DR tiers, replication across regions, and traffic routing.
RPO is set by replication lag
Under async replication the RPO is not a constant. It equals the replication lag at the instant the region dies, which is a measured quantity that spikes during bursts, link trouble, and large batch jobs. Quote the RPO as a lag target you monitor, not as a property of the architecture.
Worked example: async replica in another region
Write rate: 5,000 writes per second, about 1 KB each
Normal replication lag (p99): 2 s
Writes at risk = 5,000 x 2 = 10,000 writes (about 10 MB)
Link degrades and lag climbs to 30 s
Writes at risk = 5,000 x 30 = 150,000 writes (about 150 MB)
Business RPO = 1 s
Normal lag (2 s) already breaks it, so something must change:
1. Make the critical writes synchronous, paying one round trip each
(about 70 ms, so a checkout with 3 sequential sync writes adds 3 x 70 = 210 ms)
2. Commit by quorum across three regions (also about 70 ms per write)
3. Renegotiate: keep RPO 1 s for payments, and accept RPO 1 min for the rest
Alert when lag crosses half the RPO, so you react before the promise breaksThe four DR tiers
The four tier names are the ones AWS uses in its disaster recovery whitepaper and are common in interviews. The RPO and RTO figures are illustrative planning anchors that match the tier table in the Backup and DR problem, not guarantees, because real values depend on the stack and on how much of the failover is automated. Your drills, not this table, produce the real numbers, and you can mix tiers inside one product.
| Tier | What runs in the second region | Typical RPO | Typical RTO | Relative cost |
|---|---|---|---|---|
| Backup and restore | Only copies of the data (backups and snapshots) plus infrastructure as code to rebuild everything on demand | Hours (the backup interval) | Hours | $ |
| Pilot light | The data store is replicated and running, while app servers are off or at minimum size and scale up on failover | Minutes (replication lag) | About 30 min | $$ |
| Warm standby | A fully functional but scaled-down copy of the stack runs all the time and can serve traffic at reduced capacity at once, so it only has to scale up | Seconds (replication lag) | About 15 min or less | $$$ |
| Multi-site active-active | Every region serves live traffic and accepts writes | Near 0 | Near 0 | $$$$ |
Replication across regions
The replication mode decides the RPO and what a remote outage does to your writes. For the mechanics of leaders and followers, see Replication, Failover, & Leader Election.
| Mode | RPO | Write cost | If the remote region is down |
|---|---|---|---|
| Asynchronous | Equal to replication lag at the moment of failure, from seconds to minutes | Local commit only, so no added latency | Writes continue and lag grows, so the RPO silently gets worse |
| Synchronous to one remote region | About 0 | One inter-region round trip on every write (about 70 ms between the US East coast and Western Europe) | Writes block, or you degrade to async and the RPO promise is broken |
| Quorum across three regions | About 0 while a majority is alive | Commit waits for the faster of the two other regions | Losing any one region still leaves 2 of 3, so writes continue (after a short leader election if the leader's region was the one lost) |
Quorum placement is where candidates slip. With three regions and one replica each the majority is 2, so any single region can fail and writes continue with RPO 0. With only two regions neither side can tell a dead peer from a partition, so add a small third site as a witness. The rule is that no single region may hold half or more of the votes, so losing any one region still leaves a majority. Five replicas placed 2 + 2 + 1 survive the loss of any one region because at least 3 of 5 remain, while 3 + 1 + 1 does not because losing the big region leaves 2 of 5.
Traffic routing and failover
Routing decides how fast clients leave a dead region. For the edge mechanics, see CDN, Edge Caching, and Content Delivery.
| Mechanism | How failover happens | Delay to budget | Watch out for |
|---|---|---|---|
| GeoDNS or latency-based DNS | Health checks mark a region unhealthy and the DNS answer stops including it | The record TTL plus resolvers and clients that cache beyond it, so treat TTL as a lower bound | A low TTL raises query volume, and the DNS provider must not live in the failing region |
| Anycast | Every site advertises the same IP over BGP, and a sick site withdraws its route | BGP convergence, often tens of seconds and sometimes minutes (the CDN problem budgets 30 to 60 seconds) | Route changes can reset in-flight TCP connections, and routing follows network distance, not capacity |
| Global load balancer or client-side failover | A layer 7 proxy or the client SDK retries the next region on error | Seconds, because there is no DNS cache in the path | It is one more tier to keep alive, and blind retries can overload the surviving region |
Health checks decide when to fail over, so they matter as much as the routing mechanism. Probe from several vantage points so the checker's own network trouble does not evict a healthy region, and require several consecutive failures so the system does not flap. Check a path that exercises the service rather than just the load balancer, but avoid checks that fail whenever a shared dependency is merely slow, or one flaky dependency fails every region at once. If every region looks unhealthy, fail open and keep serving.
6. Strategic Tradeoffs
Multi-region buys survival and latency at the price of money, complexity, and a consistency tax, so we state both sides:
| Benefit | Cost |
|---|---|
| Survives a regional outage (a whole region, its control plane, or a bad config push no longer takes the product down) | Money (a second region's capacity plus replication bandwidth, which can roughly double the bill for every tier you cover) |
| Lower latency for global users (reads and, with active-active, writes are served from a nearby region) | Operational complexity (more deploy targets, config drift, cross-region debugging, and on-call that must understand failover) |
| Residency and blast radius control (regions and cells keep data local and keep failures small) | A consistency tax (sync replication is slow, async can lose data, and active-active needs conflict rules) |
Active-passive versus active-active
Active-passive keeps one writer, so consistency stays simple and failover is a deliberate act with a known RTO. Active-active removes the cold cutover and serves users from a nearby region, but every region now accepts writes, so concurrent updates to the same key need a rule. A common middle path serves reads and delivery from every region while keeping one write region, which is how the Video Streaming Platform and Payment Gateway problems treat their data.
Active-active is not free capacity. Each surviving region must absorb its share of a lost region. With total load T over three regions each serves T/3, and after one fails the survivors serve T/2 each, so each must be provisioned for T/2 and normal utilization is at most (T/3) / (T/2), about 67%. With two regions each must be provisioned for the full T, so normal utilization is at most 50%. The headroom overhead is 1/(N-1) for N regions, which is 100% for two regions and 50% for three.
What active-active costs you: conflict resolution
When two regions accept a write to the same key before they hear about each other, the system needs a rule. These are the four standard answers, and the Key-Value Store problem compares last-write-wins with hybrid logical clocks against vector clocks in detail.
| Strategy | How it works | What it costs you | Fits |
|---|---|---|---|
| Per-key home region | Each user, tenant, or hotel has one home region that takes every write for that key, and other regions hold read replicas | Remote users pay a cross-region hop to write, and losing a home region needs fenced failover for its keys | Hotel inventory per geography, ledgers, per-tenant SaaS data |
| Last-write-wins | The version with the highest timestamp wins when replicas merge | Concurrent writes are silently dropped, and clock skew can pick the wrong winner (hybrid logical clocks reduce this but do not remove it) | Caches, presence, profile fields where overwrite is acceptable |
| Version vectors | Each replica counts its own updates, so the system can tell newer from concurrent and keeps both as siblings | The app or user must merge siblings, and metadata grows with the number of writers | Shopping carts, collaborative documents, Dynamo-style stores |
| CRDTs | Data types whose merge is commutative, associative, and idempotent in the state-based form (counters, sets, registers), so replicas converge without coordination | Limited data types, tombstones that keep growing, and no way to enforce an invariant such as balance never below zero without coordination | Like counts, presence sets, collaborative text |
None of the four can enforce a global invariant such as no overselling or no overdraft, because that check needs one place that sees every write. This is the CAP choice from CAP Theorem & Consistency Models in concrete form. During a partition between regions you either reject some writes or accept conflicting ones, so money and inventory take a single writer per key while the rest of the product can go active-active.
7. Failure / Bottleneck Awareness
Most multi-region outages come from the recovery machinery rather than the original fault, so we volunteer these five up front:
Problem: A partition, not a crash, makes the standby believe the primary is dead. It promotes while the old primary is alive and still taking writes, so two histories diverge and cannot be merged cleanly.
Mitigation: Require a majority vote that includes a witness region, fence the old primary before promoting, and stamp writes with an epoch so storage rejects stale ones. Section 11 has the details.
Problem: A bad migration, an accidental delete, or ransomware replicates to the second region within the lag window, so both copies are ruined together.
Mitigation: Keep point-in-time recovery from archived logs (see Write-Ahead Logging (WAL)) plus immutable snapshots in a separate account, and time a restore regularly.
Problem: The surviving region was sized for its normal share and suddenly receives 1.5x to 2x traffic, saturates, and the failure cascades into a second outage.
Mitigation: Provision the headroom from section 6, shed low-priority load first, cap retries, and use Circuit Breakers, Retries, & Bulkheads so clients do not hammer the survivor. Reserve standby capacity ahead of time for tight-RTO tiers.
Problem: "The TTL is 60 seconds, so failover takes 60 seconds" is wrong. Some resolvers and clients cache longer, and long-lived connections never re-resolve at all.
Mitigation: Use a low TTL on failover records, measure the slow tail in drills, make clients re-resolve and retry, and use anycast or a global load balancer for tiers with tight RTOs.
Problem: The standby has drifted (older schema, expired certificates, missing quota, stale secrets), or a shared dependency such as auth, DNS, the secrets store, or the failover tooling itself lives in the region that just failed.
Mitigation: Run game days and restore tests as described in section 11, and keep the failover control plane outside any single region.
In the room
The classic mistakes are naming a multi-region design without an RPO and RTO, going active-active for a ledger, keeping backups in the failed region, promoting without fencing, and treating the TTL as the failover time. Expect the follow-ups "what happens to the writes in the lag window?", "how do you stop the old primary?", and "how do you know any of this works?"
8. Common HLD Usage
Nearly every storage and delivery problem in this set answers the multi-region question, and the answers differ by how much consistency the data needs:
| Problem | Multi-Region Pattern | Rationale |
|---|---|---|
| Backup and Disaster Recovery | RPO and RTO per service tier, async cross-region replication, fenced promotion, quarterly drills | Payments take RPO 0 through synchronous replication while analytics take RPO 1 hour from hourly backups, because cost scales with the tier. |
| Payment Gateway | Active-passive with one write region | Payment state must never split across regions because a dual write could charge twice at the PSP, so the secondary region serves read-only dashboards. |
| Video Streaming Platform | Active-active playback, single-primary metadata, async cross-region replication of uploads | Playback is geo-routed to nearby edges, while the far fewer metadata writes go to one primary so no conflict rules are needed. |
| Key-Value Store | A leaderless cluster per region with LOCAL_QUORUM and async cross-region replication | Reads and writes stay local, last-write-wins or vector clocks resolve cross-region conflicts, and global consensus is kept for critical metadata only. |
| Blob Storage (S3) | One authoritative region per bucket and async cross-region replication | Strong read-after-write holds inside the authoritative namespace, and replication to another region is disaster recovery, not instant consistency. |
| Hotel Booking System | Inventory authoritative in each hotel's home region | A guest in another region sends the booking to the hotel's region at the cost of one cross-region round trip, instead of replicating contended writes. |
| Dropbox / Google Drive | One primary region plus a standby replica region, and active-active only when latency, availability, or residency demand it | Active-active adds conflict reconciliation, so the design defers it until EU residency or global latency justifies the cost. |
| CDN | Anycast plus GeoDNS, with regional shield tiers in front of the origin | A failed PoP withdraws its route and traffic reroutes to the next closest healthy PoP, so the edge is naturally active-active. |
| Banking Ledger System | One primary for postings, read replicas per region, async replication for analytics only | A ledger cannot tolerate lost or divergent postings, so it takes a single ordered writer and synchronous durability instead of multi-writer conflict rules. |
9. Decision Signals
Pick the pattern from the RPO and RTO you are given, and mix tiers when different data has different needs:
| Required RPO | Required RTO | Pattern | Typical Example |
|---|---|---|---|
| Hours | Hours | Backup and restore, with cross-region copies and a restore you have actually timed | Internal analytics, dev tooling |
| Minutes | Tens of minutes | Pilot light: replicated data store running, compute off or minimal | Back-office tools, batch pipelines |
| Seconds | 15 minutes or less | Warm standby with async replication and automated, fenced promotion | Most customer-facing tiers such as orders or file metadata |
| About 0 | Minutes | Single writer with synchronous or three-region quorum replication, a witness, and automated fenced failover | Payment state, ledger postings |
| Seconds to minutes (reads are rebuildable) | Near 0 | Active-active serving of reads and delivery with a single write region | CDN, video playback, search |
| About 0 | Near 0, and data is partitionable by key | Active-active with a per-key home region or a quorum store | Per-geography inventory, global key-value data |
- The SLA is tighter than a manual rebuild, so the RTO cannot be met by restoring in the same region after an outage.
- Losing the last hour of data is a business or legal event, so the RPO needs a live second copy.
- Users are global and a cross-ocean round trip of about 70 ms or more hurts the experience.
- Residency rules say data must be stored and processed inside a jurisdiction.
- Data partitions by key (user, tenant, geography), so each key has exactly one home region.
- Data is read-mostly, rebuildable, or merges safely, as with cached content, counters, and sets.
- The team can run drills in every region, because an active-active setup that has never lost a region is an untested one.
- The SLA tolerates hours of downtime and a restore you have timed meets the RPO and RTO.
- The user base is regional and no residency rule forces a second location.
- Cross-region copies of backups are still the baseline here, because backups kept in the failed region are lost with it.
11. Deep Dive (Optional)
Split Brain, Fencing, and the Witness Region
Split brain means two nodes both believe they are primary. Three mechanisms layer together to prevent it. A witness or quorum decides who may lead, so the standby promotes only with a majority vote (2 of 3) and a primary that cannot reach a majority steps down. A lease makes that stepping down automatic, because the primary may accept writes only while it holds a time-bound lease and a new primary waits out the old lease plus a clock-skew margin. Fencing makes a slow or confused old primary harmless by revoking its storage credentials, blocking it at the network, or powering it off (STONITH, shoot the other node in the head), while an increasing epoch on every write lets storage reject anything older than the current epoch.
type Epoch = number;
// Storage side: the last line of defense against a stale primary
function acceptWrite(currentEpoch: Epoch, writeEpoch: Epoch): boolean {
return writeEpoch >= currentEpoch; // a write stamped 7 is refused once the epoch is 8
}
// Failover side: majority first, then fence, then promote
function failover(votes: number, voters: number): Epoch | null {
const majority = Math.floor(voters / 2) + 1;
if (votes < majority) return null; // the minority side must never promote
const newEpoch = bumpEpochInWitness(); // 7 becomes 8
fenceOldPrimary(); // revoke credentials and block the network before promoting
promoteReplica(newEpoch);
return newEpoch;
}With only two regions and no witness you must choose between automatic failover that risks split brain and manual failover that costs RTO, so add the witness or make promotion a human decision. After the incident the old primary may hold writes that never replicated. Either discard them, which is the realized RPO, or export them for manual replay, and rebuild it as a replica before any planned failback. The Backup and Disaster Recovery problem budgets hours for failback depending on data volume.
Data Residency and Regional Isolation
Residency means regulated data must be stored and processed inside a jurisdiction. Personal data of EU users is the usual example because rules such as GDPR restrict transfers out of the EU unless specific safeguards are in place, and some countries require local storage outright. The design assigns each tenant or user a home region at signup and records it in a small global directory that holds only the pointer, never the personal data. Every request for that key routes to its home region, and the database, search index, queues, caches, logs, and encryption keys all stay inside the boundary. Global features then consume aggregates or pseudonymous IDs instead of raw rows.
Residency collides with disaster recovery, because the standby for a regulated tenant must also sit inside the legal boundary. An EU tenant's DR pair is another EU region, never us-east, and a jurisdiction with a single region falls back to multi-AZ plus in-country backups. Backups, replicas, caches, and analytics exports are the usual leaks. Keys held inside the region also enable crypto-shredding for deletion requests, where destroying a user's encryption key makes every backup copy of that user's data unreadable, as in the Backup and DR problem, and Dropbox / Google Drive names EU residency as the trigger for its multi-region phase.
Cell-Based Architecture
A cell is a complete, independent copy of the service stack that serves a fixed subset of customers. A thin router maps a tenant to a cell through a small cached mapping table, and cells never call each other. A failure, poison request, or bad deploy therefore stays inside one cell, and the blast radius is 1/N of customers. With 20 cells and a rollout that goes one cell at a time and halts on any health regression, a bad build reaches at most 1/20 = 5% of customers before it is stopped.
Cells combine with regions by giving each cell a DR pair in another region. The costs are more units to operate and a router that must itself stay simple and highly available, and a cap on cell size so one huge tenant does not recreate the single point of failure. This is sharding of the whole stack, not only the data.
Runbooks, Game Days, and Restore Tests
Failover code is the least exercised code in the system, so it rots. Standbys drift, certificates expire, quotas stay at defaults, and the runbook describes an architecture from two reorganizations ago. The only defense is to exercise the path, and the options run from cheapest to most real:
- Restore tests: restore a recent backup into an isolated environment, compare row counts and checksums, run smoke queries, and time the restore against the RTO.
- Failover drills in staging: automate the full sequence and run it on a schedule, which catches configuration drift early.
- Game days in production: shift real traffic to the standby region or inject a regional failure with a rollback plan, then compare the measured RPO and RTO with the targets.
- Serve from the standby routinely: send a slice of real traffic to the standby all the time, or rotate which region is primary, so the path is proven by use.
Record the measured RPO and RTO of every drill and treat a miss as an incident. Keep the runbook as automation where possible, give every manual step an owner, and keep the failover tooling reachable when the primary region is gone.
Review
How helpful was this walkthrough?
Click a star to rate. We actively use this feedback to refine and update our system design content.
Discussion
Share your thoughts, ask questions, or help others.