Running in more than one region
Updated Nov 10, 2026 · 4 min read
A cloud region is a group of data centres in one area. Spreading an app across a region’s zones survives one building losing power, but now and then a whole region has trouble for hours. Running in a second region is how you survive that. It costs money, adds latency between regions, and forces you to decide how much data you’re willing to lose and how long you’re willing to be down.
Two numbers to agree on first
| Term | Means | Set mostly by |
|---|---|---|
| RPO, recovery point objective | How much recent data you may lose | How far behind the other region’s copy runs |
| RTO, recovery time objective | How long you may be down | Detection, promotion, DNS and how ready the standby is |
Agree on both with the business before choosing a design. “Lose at most a few seconds, back within an hour” leads somewhere very different from “lose nothing, never go down”, and the second costs far more.
Active-passive
One region takes all the traffic. The other gets a copy of every change and waits. A warm standby runs a small version of the app, ready to scale up. A cold one has the data but nothing running. When the active region fails, you promote the standby’s database to primary, scale up its servers, and point traffic at it.
Only one region writes at a time, so there are never conflicts to merge. That makes it the usual first step. The catch is that the standby has to be able to carry the full load once it takes over. A region built for half the traffic needs about twice its servers on the day it gets all of it.
Active-active
Both regions take traffic all the time, usually each serving the users nearest to it. Failover is fast, because the other region is already running and warm. But each region has to keep enough headroom to absorb the other’s users, and if both regions can write the same data, you need a plan for conflicts.
Copying data between regions
A round trip between distant regions takes tens of milliseconds, about 80 ms across the Atlantic. Synchronous replication waits for the other region before saying yes, so no data is lost, but every write gets that much slower and writes stop if the other region can’t be reached. Asynchronous replication says yes right away and copies in the background. Writes stay fast, and when a region dies you lose whatever hadn’t been copied yet, usually a second or two. Most systems choose async across regions and sync within one.
Reading your own writes
With async copies, a user can save a change and then read from a copy that doesn’t have it yet. They rename themselves, the page reloads, and the old name is back. The fix is narrow. For a short window after a user writes, or until the local copy has caught up to their write, send that user’s reads to the primary. Everyone else keeps reading locally.
Failing over with DNS
Most multi-region setups steer users with DNS. Health checks watch each region, and when one fails, the DNS record is changed to point at the other. The record’s TTL says how long resolvers may keep the old answer, so a user who looked it up just before the switch can keep going to the dead region for a full TTL. Some resolvers hold on even longer.
- Detect the failure. With checks every 10 s and 3 failures to declare it down, that’s about 30 s.
- Promote the standby database so it accepts writes, which takes seconds to minutes.
- Point DNS at the healthy region.
- Wait out the TTL as resolvers drop the old answer.
Add the steps up for your real RTO. A 300 s TTL alone is five minutes, so teams lower it to 60 s or less on records they may need to move. Anycast and global load balancers avoid the DNS wait altogether by keeping one address and moving traffic behind it.
When two regions write the same thing
In active-active, two regions can change the same record before either hears from the other. There are three ways to handle it.
- Avoid it. Give each record a home region, such as the user’s, and send every write for it there. Conflicts can’t happen, at the cost of a slower write when a user is far from home, and no writes for those records while their home region is unreachable.
- Last writer wins. Keep the write with the latest timestamp. It’s simple, but it silently throws away the other write, and clocks in two regions never quite agree. Fine for a profile photo, never for money.
- Merge. Some data merges cleanly, like counters, sets and collaborative text, using CRDTs. Data with rules that must hold, like a balance that can’t go below zero, can’t be merged after the fact.