0Pricing
AWS Solutions Architect · Lesson

Multi-Region Active-Active and Active-Passive

Route traffic to multiple Regions simultaneously with Route 53 latency routing or fail over to a warm standby with health-check failover.

Multi-Region Active-Active and Active-Passive is a free AWS Solutions Architect lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Solutions Architect learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Multi-Region Architecture?

Multi-AZ protects against single AZ failures, but an entire AWS Region can become unavailable during large-scale disasters, major outages, or regulatory requirements. Multi-region architectures address this by running workloads in two or more geographically separated regions. There are two main patterns: active-passive (one region serves traffic while another waits on standby) and active-active (both regions simultaneously serve traffic).

Active-Passive: The Warm Standby Pattern

In an active-passive multi-region setup, the primary region handles all production traffic. The secondary region runs a scaled-down but functional copy that stays warm and ready. Data is replicated from primary to secondary continuously. When the primary fails, you promote the secondary to active using Route 53 failover routing. This pattern offers lower cost than active-active but has higher RTO (time to promote and scale the standby).

# Route 53 failover routing configuration
# Primary record: us-east-1 ALB (primary)
# Secondary record: us-west-2 ALB (failover)

aws route53 change-resource-record-sets \
  --hosted-zone-id Z123 \
  --change-batch '{
    "Changes": [{
      "Action": "CREATE",
      "ResourceRecordSet": {
        "Name": "app.example.com",
        "Type": "A",
        "Failover": "PRIMARY",
        "HealthCheckId": "hc-primary"
      }
    }]
  }'

Active-Active: Traffic in Both Regions

In an active-active setup, both regions simultaneously serve production traffic. Route 53 with latency-based routing or weighted routing distributes users to the nearest or most appropriate region. When one region fails, Route 53 health checks detect the failure and route all traffic to the healthy region. Active-active provides the best RTO (near-zero), reduces latency for globally distributed users, and improves throughput by spreading load across regions.

# Route 53 latency-based routing for active-active
aws route53 change-resource-record-sets \
  --hosted-zone-id Z123 \
  --change-batch '{
    "Changes": [
      {
        "Action": "CREATE",
        "ResourceRecordSet": {
          "Name": "app.example.com",
          "Type": "A",
          "Region": "us-east-1",
          "SetIdentifier": "us-east-1",
          "HealthCheckId": "hc-use1",
          "AliasTarget": {"DNSName": "alb-use1.amazonaws.com"}
        }
      }
    ]
  }'

Data Replication Across Regions

The hardest part of multi-region architecture is keeping data consistent across regions. Key tools: S3 Cross-Region Replication (CRR) replicates S3 objects asynchronously to a bucket in another region. DynamoDB Global Tables provide multi-master, multi-region replication with eventual consistency. Aurora Global Database replicates from one primary region to up to five secondary regions with under 1 second lag. Each replication mechanism has different consistency guarantees and lag characteristics.

# Enable S3 Cross-Region Replication
aws s3api put-bucket-replication \
  --bucket source-bucket-us-east-1 \
  --replication-configuration '{
    "Role": "arn:aws:iam::123:role/replication-role",
    "Rules": [{
      "Status": "Enabled",
      "Destination": {
        "Bucket": "arn:aws:s3:::dest-bucket-us-west-2"
      }
    }]
  }'

DynamoDB Global Tables for Active-Active

DynamoDB Global Tables enable true active-active, multi-region, multi-master replication. Your application can write to DynamoDB in any region, and the changes replicate to all other regions within typically 1 second. Conflict resolution uses last-writer-wins based on timestamps. This makes Global Tables ideal for globally distributed applications like gaming leaderboards, user profiles, and session stores where low-latency local reads and writes are critical.

# Create DynamoDB Global Table
aws dynamodb create-global-table \
  --global-table-name UserProfiles \
  --replication-group \
    RegionName=us-east-1 \
    RegionName=eu-west-1 \
    RegionName=ap-southeast-1

# Applications in each region write to local DynamoDB
# Replication is automatic and bi-directional

Aurora Global Database

Aurora Global Database spans multiple AWS regions with a single primary region handling writes and up to five secondary regions handling reads with under 1 second replication lag. For DR, you can promote a secondary region to primary in under 1 minute, making it suitable for active-passive with aggressive RTO. The secondary regions can also serve low-latency read traffic, making this a hybrid active-active for reads, active-passive for writes pattern.

# Create Aurora Global Database
aws rds create-global-cluster \
  --global-cluster-identifier my-global-db \
  --engine aurora-postgresql \
  --engine-version 14.5

# Add secondary region
aws rds create-db-cluster \
  --db-cluster-identifier secondary-cluster \
  --global-cluster-identifier my-global-db \
  --engine aurora-postgresql \
  --region eu-west-1

Route 53 Health Checks for Failover

Multi-region failover relies on Route 53 health checks to detect regional failures. Health checks can monitor an endpoint (HTTP/HTTPS/TCP), a CloudWatch alarm, or be calculated from other health checks. Route 53 continuously polls your endpoints from multiple locations around the world. When a check fails, Route 53 automatically stops returning that region's records and redirects traffic to healthy regions within the DNS TTL period.

# Create Route 53 health check
aws route53 create-health-check \
  --caller-reference unique-ref-001 \
  --health-check-config '{
    "Type": "HTTPS",
    "FullyQualifiedDomainName": "app.us-east-1.example.com",
    "Port": 443,
    "ResourcePath": "/health",
    "RequestInterval": 30,
    "FailureThreshold": 3
  }'

Global Accelerator for Active-Active

AWS Global Accelerator provides two static Anycast IP addresses that route traffic through AWS's global network to the optimal endpoint. Unlike Route 53 DNS failover (which depends on TTL), Global Accelerator detects endpoint failures within 1-3 seconds and instantly reroutes traffic — much faster than DNS propagation. Use Global Accelerator when you need sub-second failover, consistent IPs for whitelisting, or when DNS TTL-based routing is too slow for your RTO.

# Create Global Accelerator
aws globalaccelerator create-accelerator \
  --name my-accelerator \
  --ip-address-type IPV4

# Add endpoints in multiple regions
aws globalaccelerator create-endpoint-group \
  --listener-arn arn:aws:globalaccelerator::123:accelerator/xxx/listener/yyy \
  --endpoint-group-region us-east-1 \
  --endpoint-configurations EndpointId=alb-us-east-1-arn,Weight=100

Conflict Resolution in Active-Active

Active-active multi-region architectures face a fundamental challenge: write conflicts. If two regions simultaneously update the same record, which update wins? DynamoDB Global Tables uses last-writer-wins. Application-level conflict resolution strategies include: event sourcing (append-only logs with CRDT merge), versioning (reject writes with stale version numbers), or partitioned writes (each region owns a shard of data and only writes to its shard). Design your data model to minimise cross-region write conflicts.

# DynamoDB conditional write to prevent conflicts
aws dynamodb update-item \
  --table-name Orders \
  --key '{"orderId":{"S":"ord-123"}}' \
  --update-expression 'SET #s = :newStatus' \
  --condition-expression '#v = :expectedVersion' \
  --expression-attribute-names '{"#s":"status","#v":"version"}' \
  --expression-attribute-values '{":newStatus":{"S":"shipped"},":expectedVersion":{"N":"1"}}'

Costs and Operational Complexity

Multi-region architectures significantly increase cost and complexity. You pay for resources in multiple regions, data replication costs (cross-region data transfer), health check costs, and often need duplicate operational tooling in each region. Active-passive is more cost-effective because the standby runs at reduced capacity. Active-active costs the most but provides the best user experience and RTO. Always weigh the cost against the business value of additional regional resilience.

# Key costs in multi-region architecture:
# - EC2/RDS in each region: full compute costs
# - Cross-region data transfer: ~$0.02/GB
# - Route 53 health checks: ~$0.50/check/month
# - Global Accelerator: $0.025/hour + data transfer
# - DynamoDB Global Table replication: per-write charges per region
# - Aurora Global Database: storage replicated to all regions

Choosing the Right Multi-Region Pattern

Choose your multi-region pattern based on business requirements: If RTO > 1 hour and cost is the priority, use Backup and Restore to another region. If RTO is minutes, use active-passive with warm standby. If RTO < 1 minute and users are globally distributed, use active-active. Consider regulatory requirements — some industries require data to stay in specific regions, which may limit your replication options. Document your architecture decision with the trade-offs explicitly.

# Decision matrix:
# RTO > 1 hour, RPO > 1 hour:  Backup & Restore
# RTO ~minutes, RPO ~minutes:   Active-Passive (Warm Standby)
# RTO < 1 minute, RPO ~0:       Active-Active

# Key services for each:
# Backup & Restore: AWS Backup + S3 CRR
# Active-Passive:   Aurora Global DB + Route 53 failover
# Active-Active:    DynamoDB Global Tables + Global Accelerator

Quick Check

Test your understanding of AWS Solutions Architect (SAA-C03) concepts from this lesson.

Lesson Recap

In this lesson you learned: active-passive runs a standby region that activates on failure, active-active serves traffic from multiple regions simultaneously, and DynamoDB Global Tables and Aurora Global Database are key services for multi-region data replication. Route 53 health checks and Global Accelerator handle traffic routing decisions. Next up we explore health checks, circuit breakers, and retry logic.

Frequently asked questions

Is the “Multi-Region Active-Active and Active-Passive” lesson free?

Yes — the full text of “Multi-Region Active-Active and Active-Passive” is free to read here on the web, and the AWS Solutions Architect course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Solutions Architect course, upgrade to CoddyKit PRO.

What will I learn in “Multi-Region Active-Active and Active-Passive”?

Route traffic to multiple Regions simultaneously with Route 53 latency routing or fail over to a warm standby with health-check failover. You practise AWS Solutions Architect with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start AWS Solutions Architect?

No prior experience is required. AWS Solutions Architect on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Multi-Region Active-Active and Active-Passive” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this AWS Solutions Architect lesson?

Yes. Every AWS Solutions Architect lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. HA vs Fault Tolerance: Definitions and Trade-offs
  2. Multi-AZ Patterns for Stateful Services
  3. Multi-Region Active-Active and Active-Passive
  4. Health Checks, Circuit Breakers, and Retry Logic
← Back to AWS Solutions Architect