Full answer
Why active-active
Active-passive keeps a standby region idle until disaster; failover is slow, rarely tested and the standby may not handle full load. Active-active uses every region all the time, gives low latency to users everywhere and makes failover a routing change.
Routing
- Latency-based or geo DNS sends each user to the nearest healthy region; TTLs of 30 to 60 seconds limit how long clients stick to a dead region.
- Anycast (one IP announced from many places) with a global load balancer reacts faster, in seconds.
- Sticky homes: route a signed-in user to their home region when possible, so their reads see their own writes.
Data replication options
- Home-region partitioning (most common). Each user, tenant or account has one home region that accepts its writes; other regions get asynchronous copies for reads. No write conflicts, because only one region writes each record. Moving a user's home is an explicit migration.
- Multi-leader with conflict resolution. Any region writes any record and replicates asynchronously. Concurrent updates conflict:
- last-write-wins by timestamp (simple, silently loses updates);
- CRDTs for counters, sets, carts (merge without loss);
- application merge rules or showing conflicts to users.
- Globally consistent databases (Spanner, CockroachDB, YugabyteDB with global tables) use consensus across regions. Every write waits for a majority of regions, adding tens to hundreds of milliseconds, but there are no conflicts.
Many systems mix: global consistency for small critical data (usernames, payments), home-region writes for user data, CRDTs for counters.
Region failure
- Routing removes the failed region within seconds to minutes.
- With asynchronous replication, the last few seconds of writes in that region (the replication lag) may be missing elsewhere: the recovery point objective is the lag, not zero.
- For home-region data, another region is promoted as the new home for affected users; when the old region returns, its unreplicated writes must be reconciled, not blindly applied.
Other concerns
- Data residency laws may require some users' data to stay in a region, which limits replication.
- Capacity: each region must absorb a failed region's traffic; with three regions, run each at under about 66% of peak.
- Global services such as ID generation, auth keys and configuration must also be multi-region, or they become the hidden single point of failure.
- Test failover regularly by draining a region on purpose.
By level
Fresher: Explain that several regions serve users at once and copy data to each other. A fresher should see that two regions editing the same thing at once can conflict.
Mid: Compare home-region partitioning, multi-leader with conflict resolution and global consensus. Describe failover with replication lag.
Senior: Discuss mixed strategies per data type, recovery point objectives, reconciliation after failback, residency, headroom and failover drills. Expect precise trade-offs.
Key points
- Every region serves traffic; routing by latency DNS or anycast
- Home-region ownership avoids write conflicts
- Multi-leader needs LWW, CRDTs or app merges
- Global consensus databases avoid conflicts at the cost of cross-region latency
- Async replication means failover can lose the last few seconds of writes
Common mistakes
- Assuming async replication gives zero data loss on failover
- Using last-write-wins for money or inventory
- Forgetting capacity headroom to absorb a failed region
- Leaving global dependencies in a single region
Follow-ups
- How would you migrate a user's home region?
- How do you handle unique usernames across regions?
- How would you test region failover safely?
Tips
- Separate routing, data and failure handling
- Present home-region ownership as the default
- State the recovery point honestly
Evaluation rubric
- Clear routing design
- Correct replication options and conflicts
- Realistic failure analysis
- Capacity, residency and global dependency awareness