Lab · Architecture at scale

Multi-region & disaster recovery

Users in the US and Europe, a region on each side. Choose one region, active-passive or active-active. Then fail a region or cut the link between them. Measure latency, downtime (RTO), lost writes (RPO), conflicts and the cost of the standby.

Try it

Lab time 3.0 s
US East regionEU West regionasync copywrites forwardedUS users, → US EastUS users→ US Eastp50 35 msEU users, → EU WestEU users→ EU Westp50 35 msUS East, primary · takes writesUS Eastprimary · takes writes100% capacityEU West, standby replicaEU Weststandby replica50% capacityWitness, third site · votes on failoverWitnessthird site · votes…
  • US users — → US East — healthy — p50 35 ms
  • EU users — → EU West — healthy — p50 35 ms
  • US East — primary · takes writes — healthy — 100% capacity
  • EU West — standby replica — healthy — 50% capacity
  • Witness — third site · votes on failover — healthy
  • Request/response
  • Replication link
  • Read
  • Write
  • Copied change
Availability
100.0%
requests that succeeded
Write outage
0 ms
longest, as users saw it (RTO)
Lost writes
0
acknowledged, now missing (RPO)
US
35 ms
EU
35 ms
Write
125 ms
Stale reads
0
reads served by the nearby region
Conflicts
0
Shed
0
writes refused: over capacity
Split brain
0 ms
time with two primaries
Standby cost
50%
of a full region (illustrative)

Numbers add up:requests 38 = succeeded 38 + failed 0 + in flight 0; no region holds a write its origin never madeThe lab checks this sum as it runs, so a counting mistake would show here.

Controls

Architecture
Regions

US East takes all writes; EU West is a standby replica that can be promoted.

Replication to the standby

Acknowledge first, copy later. Fast writes; a failover can lose recent writes.

Standby size

Half the fleet runs. Moderate cost; short scale-up.

Changing these restarts the simulation.

Traffic & data
6/s
500 ms
Failover
5.0 s

Matters only when a region fails: each user keeps going to the failed region until their saved address runs out.

Failures

Click a region in the diagram to fail or recover it.

Availability (% of requests succeeding)
02550751001s2s3s
Show data table
TimeAvailability
1s100
1s100
2s100
2s100
3s100
3s100
Lost writes (acknowledged, now missing)
00.30.50.811s2s3s
Show data table
TimeMissing
1s0
1s0
2s0
2s0
3s0
3s0
Write latency (ms)
0501001502001s2s3s
Show data table
Timep99
1s125
1s125
2s125
2s125
3s125
3s125

What just happened

Nothing yet. Start traffic or run an experiment.

What this model simplifies
  • Two regions and one database per region. Round trips are fixed: 30 ms to a nearby region, 100 ms across the ocean, 90 ms between regions.
  • Every piece of data is a counter, so "lost" is exact. Real data (profiles, orders) usually cannot be merged and needs a single home region per record or application-level reconciliation.
  • Health checks notice a dead region after a fixed time; DNS repointing is modelled as each user honouring the TTL exactly. Real clients and resolvers often cache longer.
  • When split brain heals, the newer primary wins automatically. Real systems fence the old primary (epochs, lease revocation) and often need manual reconciliation.
  • Capacity limits only writes, and scale-up is a fixed delay. Standby cost is a rough share of a full region, not a price.
  • There is no failback: a recovered primary stays a replica until you change roles.