Multi-region architecture
Active-passive versus active-active, the physics of cross-region latency, and how data follows users.
22 min readWhy go multi-region
Three reasons, and you should know which applies. Latency: light in fibre travels about 200 km per millisecond, so a round trip from Sydney to Virginia is at least about 160 ms and in practice over 200 ms. Availability: a whole cloud region does go down a few times a decade, and some businesses cannot be offline for hours. Regulation: data residency laws may require European users' data to stay in Europe. Each reason leads to a different design, and all of them roughly double operational complexity.
Active-passive
One region serves all traffic; a standby region receives asynchronous replication and can be promoted. It is the simpler option and protects against region loss, but failover is a big, rarely exercised event, and asynchronous replication means a recovery point objective of seconds to minutes. Test failover regularly, or it will not work when you need it. Active-passive does nothing for users far from the primary region. A cheaper variant, pilot light, keeps only the data replicated and scales up compute during failover, trading a longer recovery time for lower standing cost.
Active-active
Every region serves reads and writes for its users, and losing a region means rerouting rather than promoting. Reads are local. Writes take one of three paths, and different datasets in the same product can take different ones.
- Home region per record: writes for a user go to that user's home region, which is local for most users and conflict-free
- Multi-leader with conflict resolution: every region writes locally and merges asynchronously
- Globally consistent store (Spanner, CockroachDB): every write pays a cross-region quorum, 50 to 150 ms or more
Partition stateless and stateful differently
Stateless services are easy: deploy identical copies in every region. The hard part is data. Classify each dataset: global reference data (catalogue, configuration) replicated everywhere read-mostly; user-owned data homed by user; and global invariants (usernames, payments) owned by one region or a consensus store. Keep cross-region calls off the synchronous request path wherever possible: a request that hops between continents twice has spent 300 ms before doing any work. Replicate asynchronously in the background instead.
Capacity for failover
If three regions each run at 70% and one fails, its traffic lands on the other two, pushing them to 105%: an outage becomes a global one. Run each of N regions at no more than (N - 1) / N of capacity, about 66% for three regions, or be able to scale up faster than the failover happens. On the canvas, simulate a region failure in the Feedback panel and check the surviving regions' utilisation.
Key takeaways
- Know whether you go multi-region for latency, availability or residency; each changes the design
- Active-passive is simpler but has a non-zero RPO and must be failover-tested
- Active-active needs a per-dataset write strategy: home region, merge, or global consensus
- Leave enough headroom that surviving regions can absorb a failed region's load
Sign in to track lessons and earn badges.