Multi-Region Failover Diagram

This sample shows an active-passive disaster-recovery setup across two AWS regions. All users are served from us-east-1; us-west-2 keeps a small warm copy of the application and a continuously replicated database. If the primary region fails its health check, DNS sends users to the secondary. The diagram makes the routing rule, the replication links and the standby capacity explicit.

It is an architecture (topology) diagram. UML covers software structure and behaviour; topology diagrams are the standard companion notation for infrastructure and resilience.


1. The diagram

Active-passive across two AWS regions Users Route 53 failover routing policy Route 53 health check HTTPS /health, 3 failures 1 2 PRIMARY SECONDARY Primary: us-east-1 (active) Application Load Balancer App tier: ASG, 6 instances serves all traffic Aurora writer global database primary S3 bucket (source) Secondary: us-west-2 (passive) Application Load Balancer App tier: ASG, 2 instances warm standby, scales on failover Aurora reader secondary cluster, read-only S3 bucket (replica) 3 async, lag ~1 s S3 CRR RTO: minutes RPO: seconds
  1. DNS decides. Route 53 holds two records for the same name with a failover routing policy: PRIMARY points at the us-east-1 load balancer, SECONDARY at us-west-2.
  2. Health check. Route 53 health checkers probe /health in the primary region from several locations. While it passes, only the primary record is returned; the endpoint should check the database too, not just the web server.
  3. Data follows. Aurora Global Database replicates storage to the secondary region asynchronously, usually under a second behind. S3 Cross-Region Replication copies uploaded objects. The secondary app tier runs at reduced size so it is warm, not cold.

The two numbers on the right are the point of the whole picture: RTO (how long until service is back) is minutes because DNS and scaling take time; RPO (how much data can be lost) is seconds because replication is asynchronous.

2. How to read it

Notation used on this page Active region Passive region Writer single source Standby idle or scaled in 1 step live traffic standby / checks replication

Solid green means live; grey dashed means waiting. Check that every stateful box in the active region has a green dashed replication arrow to its twin, and that the passive side has enough capacity, or a fast enough scaling policy, to take full load.

3. Variant: after a regional failover

Variant: after a regional failover Users Route 53 health check FAILED unhealthy NOW SERVING us-east-1 (impaired) Application Load Balancer App tier: unreachable no traffic Old writer: detached rejoins later as secondary S3 bucket (source) us-west-2 (now active) Application Load Balancer App tier: ASG, 6 instances scaled out from 2 Aurora writer (promoted) global failover S3 bucket (replica, now used) replication broken writes lost: those not yet replicated

The "after" picture is what the runbook should match. The health check fails, Route 53 starts answering with the secondary record (clients pick it up once the record's TTL expires, so keep it short, such as 60 seconds), the Aurora secondary is promoted to writer, and the Auto Scaling group grows from 2 to 6 instances. Writes that had not replicated yet are lost: that is the RPO made visible. Failing back is a separate, planned operation.

4. Pros, cons, and when to use

Pros

Cons

When to use

When not to use

5. Diagrams-as-code

The main diagram in D2:

users: Users
dns: Route 53 failover policy
hc: Health check HTTPS /health
users -> dns
hc -> dns: status {style.stroke-dash: 4}

primary: us-east-1 (active) {
  alb: ALB
  app: ASG 6 instances
  db: Aurora writer
  s3: S3 source
  alb -> app -> db
}
secondary: us-west-2 (passive) {
  style.stroke-dash: 4
  alb: ALB
  app: ASG 2 instances (warm)
  db: Aurora secondary (read-only)
  s3: S3 replica
  alb -> app -> db
}
dns -> primary.alb: PRIMARY
dns -> secondary.alb: SECONDARY {style.stroke-dash: 4}
hc -> primary.alb: probe {style.stroke-dash: 4}
primary.db -> secondary.db: async storage replication
primary.s3 -> secondary.s3: CRR