Design to Scale
Multi-Region Architecture
Run in more than one region to survive a whole-region outage and serve users from nearby — choosing between active-passive and active-active, and paying for it with data replication.
What you will learn
- Explain why a single region is a single point of failure.
- Compare active-passive and active-active designs.
- Understand DNS failover timing and its limits.
- Plan data replication and conflict handling across regions.
Before you start
Overview
A company with one office stops working when that city has a blackout. With a second office in another city it can carry on — either by keeping the second office mostly idle as a backup, or by having both offices work all the time and share the load.
Cloud regions are independent groups of data centres. A region-wide outage is rare but real (power, network, a bad deploy of a regional control plane). Running in several regions protects against that and brings servers closer to users. The hard part is not the stateless tier — it is data: every region needs it, and copying it across thousands of kilometres takes time.
Run it
European and US users; the whole eu-west region fails from t = 15 s to 35 s. Compare p50 and seconds with errors for each user group across the three designs.
Designs
| Design | Normal latency | Region outage | Data |
|---|---|---|---|
| Single region | Far users pay the round trip | Total outage | Simple |
| Backup & restore / pilot light | Far users pay | Hours: rebuild in another region | Backups or async replica |
| Active-passive (warm standby) | Far users pay | Minutes: detect + promote + DNS | Async replica; RPO = replication lag |
| Active-active | Everyone nearby | Seconds, only for the failed region's users | Writes in several regions: conflicts or partitioned ownership |
Data across regions
- Single writer, read everywhere: one region owns writes; others serve replicas (fast reads, writes pay the trip).
- Partition by home region: each user's data is written only in their home region — no conflicts, and it helps data residency.
- Multi-writer: any region accepts writes; you need conflict resolution (last-write-wins, CRDTs) or a globally consistent database (Spanner, CockroachDB) that pays latency on every write.
- Asynchronous replication means the last seconds of writes can be lost when a region fails (RPO > 0).
DNS health-checked failover
{
"Name": "api.example.com", "Type": "A", "TTL": 30,
"Records": [
{ "SetIdentifier": "eu-west-1", "Region": "eu-west-1", "Value": "203.0.113.10", "HealthCheckId": "hc-eu" },
{ "SetIdentifier": "us-east-1", "Region": "us-east-1", "Value": "198.51.100.20", "HealthCheckId": "hc-us" }
]
}Trade-offs
| Benefits | Costs | |
|---|---|---|
| Resilience | Survives the loss of a whole region. | Failover paths are complex and rarely exercised. |
| Latency | Active-active serves users from nearby. | Cross-region writes or consistency checks add tens to hundreds of ms. |
| Cost & effort | Standby regions can run scaled down. | Roughly double infrastructure, plus replication, data transfer and operational complexity. |
Production considerations
- Make every region able to run alone at full load — or have a plan to shed load.
- Keep global dependencies (auth, DNS, config, CI/CD) out of the single-region trap.
- Practise regional evacuation regularly; measure the real RTO and RPO.
- Check data residency rules before replicating personal data across borders.