Skip to content
$ lynuxpro
← All system designs

SENIOR · 15 MIN · SRE · PLATFORM

Multi-region active-active service

Serve users from the nearest region, survive a whole region failing, and choose your data consistency on purpose.

Peak load
50,000 req/s global
Availability target
99.99%
RTO: back up within
5 min
RPO: data you can lose
0-1 s

← Swipe sideways to see the whole diagram →

ClientEdge / networkServiceData storeInfrastructureasync / background

The question

"Our service must stay up even if an entire cloud region goes down, and users in Europe and the US should get low latency. Design it."

Requirements

  • Users go to the nearest healthy region.
  • Lose a whole region and keep serving, ideally without losing data.
  • Each region can handle 100% of traffic during a failover.
  • Clear targets: for example RTO (time to recover) under 5 minutes, RPO (data you can lose) near zero.

How it works

  1. Global routing (GeoDNS like Route 53 latency routing, or an anycast load balancer) sends each user to the closest region.
  2. Each region runs the full stack across three Availability Zones, behind its own load balancer.
  3. Data lives in a globally replicated database (Spanner, Aurora Global Database, DynamoDB global tables or CockroachDB).
  4. Health checks remove a broken region from routing automatically.
  5. Each region is sized (or can autoscale fast enough) to carry the other's traffic.

The hard part: data

ChoiceHow it behavesTrade-off
Single writer region, read replicas elsewheresimple, strong consistencywrites from far away are slow; failover needs promotion
Multi-writer, last-write-wins (DynamoDB global tables)fast local writes everywhereconflicting writes: one silently wins
Globally consistent (Spanner, CockroachDB)strong consistency everywherewrites wait for a cross-region quorum (higher latency)

Remember it: you can't have everything during a network split (the CAP idea). Pick per data type: money needs consistency, a "last seen" timestamp doesn't.

Key decisions

  • Static stability: don't depend on the control plane during a failure; keep enough capacity already running.
  • Cell-based design: split users into independent cells so one bad deploy or hot shard hurts a few cells, not everyone.
  • Practise failovers: regular game days where you really drain a region.

What breaks and how it heals

  • Region outage: health checks fail, DNS stops sending users there (watch DNS TTLs: keep them short, 30-60 s).
  • Split brain: use a database with a proper quorum instead of building your own failover logic.
  • Failover overloads the other region: pre-scaled capacity and load shedding for non-critical features.

Load and capacity

ItemAssumptionResult
Global traffic50,000 requests/s at peak60% US (30,000/s), 40% EU (20,000/s)
Failover sizingeither region must take all 50,000/srun each region at ~60% CPU target with headroom
One app pod~500 requests/s100 pods per region at full load, spread over 3 AZs

High availability and disaster recovery

TargetNumberHow it is met
Availability99.99% = 4.3 minutes per month2 regions × 3 AZs, both serving traffic
Region failstraffic moves in ~1.5-2 minuteshealth checks every 10 s, 3 failures = 30 s, plus a 60 s DNS TTL
RTO5 minutes including scale-upeach region already runs enough for 100% of traffic (or autoscales within minutes)
RPO0 with a synchronous quorum database (Spanner, CockroachDB); ~1 s with async replication (Aurora Global, DynamoDB global tables)choose per data type
Cost of strong consistency+70-100 ms per writea US-EU round trip for the quorum

What interviewers listen for

  • Clear RTO/RPO targets and how the design meets them.
  • An honest data-consistency choice with trade-offs.
  • Capacity for failover, short DNS TTLs, and tested failover.