Q: Design a multi-region active-active architecture.
A multi-region active-active architecture runs full application stacks in two or more AWS Regions that all serve live traffic, with global routing in front and replicated data behind.
Want to master this scenario in a live sandbox? Stephane Maarek's AWS Certified DevOps Engineer Professional Masterclass on Udemy covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: A <strong>multi-region active-active architecture</strong> runs full application stacks in two or more AWS Regions that all serve live traffic, with global routing in front and replicated data behind. The hard part is not compute, which is stateless and easy to duplicate, but data: writes in several Regions create conflicts, replication is asynchronous, and some services only support a single writer. Interviewers ask this to see whether you reason about consistency, failure domains, cost and testing, rather than just drawing two copies of a VPC.
Decide requirements first: RTO, RPO, consistency and cost for a multi-region active-active design
Active-active is the most expensive and most complex multi-Region pattern, so justify it before choosing it.
- Why active-active: near-zero RTO and low latency for users in several geographies. If minutes of downtime are acceptable, pilot light or warm standby is cheaper and simpler.
- RPO and consistency: cross-Region replication is asynchronous in most services, so a Region failure can lose the last moments of writes. Decide whether the business tolerates that.
- Capacity: each Region must absorb the other's traffic on failure, so you either overprovision (cost) or rely on autoscaling and pre-warmed capacity (risk).
- Compliance: data residency rules may forbid replicating some data to another Region, which can force a partitioned, user-homed design instead.
- Pattern ladder: backup and restore, pilot light, warm standby and active-active form a spectrum of cost versus recovery speed. Naming where active-active sits shows you chose it on purpose.
Hands-on: global routing and a stateless compute layer
Route users to the nearest healthy Region and keep each Region independently deployable.
# Route 53 latency records with health checks (Terraform)
resource "aws_route53_record" "app_use1" {
zone_id = aws_route53_zone.main.zone_id
name = "app.example.com"
type = "A"
set_identifier = "us-east-1"
health_check_id = aws_route53_health_check.use1.id
latency_routing_policy { region = "us-east-1" }
alias {
name = aws_lb.use1.dns_name
zone_id = aws_lb.use1.zone_id
evaluate_target_health = true
}
}
# repeat for eu-west-1 with its own health check and ALB
- Route 53: latency-based or weighted records with health checks send users to the closest healthy Region and remove an unhealthy one from answers.
- Global Accelerator: anycast IPs route over the AWS backbone with fast failover that does not depend on client DNS caching, useful when TTLs are a concern.
- Stateless services: ECS, EKS or Lambda in each Region, deployed from the same pipeline. No session state on instances; use signed tokens or a replicated store.
- Regional isolation: each Region is a full stack with its own VPC, load balancer and queues, so a failure cannot cascade across Regions.
Data layer: choose the store by write pattern
Each AWS data service has different multi-Region semantics; naming them accurately is what separates a strong answer.
# Add a replica Region to an existing DynamoDB table (global tables 2019.11.21)
aws dynamodb update-table \
--table-name orders \
--replica-updates '[{"Create":{"RegionName":"eu-west-1"}}]' \
--region us-east-1
aws dynamodb describe-table --table-name orders --region us-east-1 \
--query 'Table.Replicas[].[RegionName,ReplicaStatus]'
- DynamoDB global tables: multi-writer, multi-Region replication. Concurrent writes to the same item resolve with last-writer-wins by default, so design keys and updates to avoid hot cross-Region conflicts.
- Aurora Global Database: one primary Region accepts writes while secondary Regions serve low-latency reads. It supports fast cross-Region promotion, but it is not multi-writer by default, so true active-active writes need write forwarding or partitioning.
- S3: cross-Region replication is asynchronous and per-prefix; Multi-Region Access Points give a single global endpoint over replicated buckets.
- Queues and caches: SQS and ElastiCache are Regional. Publish events to a bus or stream per Region, or replicate through a global datastore, and make consumers idempotent.
Failure modes: conflicts, replication lag and split brain
Design for the failures you will actually hit, not just a clean Region outage.
- Write conflicts: use globally unique IDs (ULIDs or UUIDs), additive or commutative operations, and avoid read-modify-write on the same item from two Regions.
- Replication lag: a user who writes in Region A and reads in Region B may not see the change. Use sticky routing for a session or read-your-writes via the home Region.
- Idempotency: retries during failover can duplicate requests. Require idempotency keys on payment-like operations and deduplicate consumers.
- Grey failure: a Region that is degraded but passing shallow health checks is worse than a dead one. Use deep health checks that exercise dependencies, and alarm on error rate.
Operate, test and automate
An untested failover is a hypothesis; active-active designs rot unless exercised.
- Game days: regularly shift traffic weights to 100 percent in one Region and confirm capacity, latency and data correctness.
- Fault injection: use AWS Fault Injection Service to simulate dependency failure and connectivity loss in a controlled Region.
- Infrastructure as code: deploy identical stacks with one Terraform or CDK module parameterised by Region, and pipeline both Regions with staged rollout.
- Observability: aggregate metrics per Region and alarm on replication lag (for example DynamoDB
ReplicationLatency), health check status and error budget burn.
- Multi-region active-active means identical stacks in two or more Regions all serving traffic, routed by Route 53 or Global Accelerator with health checks.
- Compute is stateless; data uses DynamoDB global tables or partitioned home-Region writes, with idempotent consumers and conflict-safe keys.
- I prove it with scheduled failover game days, deep health checks, and replication lag alarms.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Assuming Aurora Global Database gives multi-Region writes It has a single writer Region; promotion is fast but writes in another Region need forwarding or a different design.
- Relying on shallow health checks that only hit a static page A Region with a broken database still looks healthy, so traffic is never shifted away.
- Ignoring capacity on failover The surviving Region receives double traffic; without headroom or pre-scaled capacity, a failure becomes a cascade.
- Never exercising failover Configuration drift, expired credentials or missing replicas surface only during the real outage.