0Pricing
AWS Solutions Architect · Lesson

Multi-Site Active-Active with Global Tables and Route 53

Run full production capacity in two or more Regions simultaneously using DynamoDB Global Tables, Aurora Global Database, and Route 53 latency routing.

Multi-Site Active-Active with Global Tables and Route 53 is a free AWS Solutions Architect lesson on CoddyKit — lesson 4 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.

Multi-Site Active-Active Defined

Multi-Site Active-Active is the highest tier of disaster recovery, where your application runs at full production capacity in two or more AWS regions simultaneously. Unlike active-passive where a standby waits to take over, in active-active both regions serve live user traffic at all times. When one region fails, the other absorbs 100% of traffic immediately with no failover delay. This pattern also reduces latency for globally distributed users by serving them from the nearest region.

# Active-Active traffic split (normal operation):
# us-east-1: serving ~50% of users (North America)
# eu-west-1: serving ~50% of users (Europe)

# Active-Active traffic split (us-east-1 failure):
# us-east-1: 0% (health check failed)
# eu-west-1: 100% (ASG scales up automatically)

# RTO: near-zero (DNS TTL propagation only)
# RPO: near-zero (with DynamoDB Global Tables)

DynamoDB Global Tables Architecture

DynamoDB Global Tables is the data backbone of active-active architectures. Global Tables enable multi-master, multi-region replication — applications in any region can read and write to a local DynamoDB table, and changes replicate to all other regions within approximately 1 second. You enable Global Tables by specifying which regions the table should exist in. AWS handles all replication, conflict resolution (last-writer-wins), and failover automatically.

# Create DynamoDB table and add global regions
aws dynamodb create-table \
  --table-name UserSessions \
  --attribute-definitions AttributeName=userId,AttributeType=S \
  --key-schema AttributeName=userId,KeyType=HASH \
  --billing-mode PAY_PER_REQUEST \
  --region us-east-1

# Add replica regions for Global Table
aws dynamodb update-table \
  --table-name UserSessions \
  --replica-updates '[{"Create":{"RegionName":"eu-west-1"}},{"Create":{"RegionName":"ap-southeast-1"}}]' \
  --region us-east-1

Aurora Global Database for Write-Active Reads

Aurora Global Database provides active-active reads but active-passive writes. All secondary regions serve reads with under 1 second replication lag, while only the primary region accepts writes. This is ideal for read-heavy applications that want low-latency reads globally with a clear write primary. During a regional failure of the primary, you can promote a secondary to primary in under 1 minute, achieving low RTO for the write tier. Compare with DynamoDB Global Tables which supports active-active writes in all regions.

# Aurora Global Database read configuration
# Primary region (us-east-1): reads + writes
# Secondary region (eu-west-1): reads only
#   ~100ms replication lag, serves EU users low-latency reads

# Application reads from local Aurora endpoint
# Application writes to primary region Aurora endpoint

# Java connection string with region routing:
# readEndpoint=eu-west-1.cluster-ro-xxx.aurora.amazonaws.com
# writeEndpoint=us-east-1.cluster-xxx.aurora.amazonaws.com

Route 53 Routing for Active-Active

Route 53 is the traffic director for multi-site active-active architectures. Use latency-based routing to send each user to the region with the lowest network latency from their location. Attach health checks to each regional record — when a region fails its health check, Route 53 automatically removes it from DNS responses, sending all traffic to the remaining healthy regions. Set DNS TTL to 60 seconds or less to minimise the time it takes for users to fail over to the healthy region.

# Route 53 latency routing with health checks
aws route53 change-resource-record-sets \
  --hosted-zone-id ZXXX \
  --change-batch '{
    "Changes": [
      {
        "Action": "UPSERT",
        "ResourceRecordSet": {
          "Name": "api.example.com",
          "Type": "A",
          "Region": "us-east-1",
          "SetIdentifier": "us-east-1",
          "HealthCheckId": "hc-us-east-1",
          "AliasTarget": {"DNSName": "alb-us-east-1.amazonaws.com", "EvaluateTargetHealth": false}
        }
      }
    ]
  }'

Auto Scaling for Traffic Absorption

When one region fails in an active-active setup, the surviving region must handle 2x (or more) its normal traffic. Your Auto Scaling Group must have sufficient max capacity and scale-out policies that react quickly. Configure target tracking scaling based on ALB request count per target, so the ASG adds instances automatically as traffic doubles. Also consider pre-warming: during failover drills, observe how quickly your ASG scales out and ensure it can reach the required capacity within your RTO target.

# ASG target tracking for request count
aws autoscaling put-scaling-policy \
  --auto-scaling-group-name app-asg-eu-west-1 \
  --policy-name scale-on-requests \
  --policy-type TargetTrackingScaling \
  --target-tracking-configuration '{
    "TargetValue": 1000,
    "PredefinedMetricSpecification": {
      "PredefinedMetricType": "ALBRequestCountPerTarget",
      "ResourceLabel": "app/my-alb/xxx/targetgroup/my-tg/yyy"
    },
    "ScaleInCooldown": 60,
    "ScaleOutCooldown": 30
  }'

Session Management in Active-Active

In a single-region architecture, user sessions can be stored locally on application servers. In active-active multi-region, users may bounce between regions on subsequent requests, breaking server-side sessions. Solutions: 1) Stateless sessions — store session data in a signed JWT or cookie that any server in any region can validate. 2) DynamoDB Global Tables for sessions — store sessions centrally with millisecond access from any region. 3) ElastiCache with Global Datastore — Redis replication across regions for session storage.

# DynamoDB Global Table for session storage
# Session item structure:
{
  'sessionId': 'sess-abc123',
  'userId': 'usr-456',
  'data': {'cart': [...], 'preferences': {}},
  'expiresAt': 1750000000,
  'lastUpdatedRegion': 'us-east-1'
}

# Application reads from local region DynamoDB
# Writes replicate to all regions within ~1 second
# No sticky sessions needed on the ALB

Write Conflicts and Resolution

The biggest challenge in active-active with multi-master writes is write conflicts. If two users in different regions simultaneously update the same record, which update wins? DynamoDB Global Tables uses last-writer-wins based on the timestamp of the write. This works well for most use cases but can cause data loss for competing updates (e.g., two users simultaneously incrementing a counter). Design your data model to avoid concurrent writes to the same item by different regions using conditional writes or by partitioning data ownership by region.

# Avoid conflicts with conditional writes
aws dynamodb update-item \
  --table-name UserProfiles \
  --key '{"userId":{"S":"usr-123"}}' \
  --update-expression 'SET profileVersion = profileVersion + :inc, username = :name' \
  --condition-expression 'profileVersion = :expectedVersion' \
  --expression-attribute-values '{
    ":inc":{"N":"1"},
    ":name":{"S":"newname"},
    ":expectedVersion":{"N":"5"}
  }'
# If another region already updated version, this fails gracefully

S3 Replication in Active-Active

For object storage in active-active, use S3 Cross-Region Replication with bidirectional replication (available on buckets with versioning enabled). Unlike one-way CRR, bidirectional replication keeps both region buckets in sync — objects written in either region are automatically replicated to the other. This is critical for applications that write user-uploaded files to their local region's S3 bucket but need those files accessible globally. Enable S3 Replication Time Control (RTC) to guarantee 99.99% of objects replicate within 15 minutes.

# Bidirectional S3 replication
# Bucket A (us-east-1) replicates to Bucket B (eu-west-1)
# Bucket B (eu-west-1) replicates to Bucket A (us-east-1)

# Enable S3 RTC for guaranteed replication time
aws s3api put-bucket-replication \
  --bucket us-east-1-uploads \
  --replication-configuration '{
    "Rules": [{
      "Status": "Enabled",
      "ReplicationTime": {"Status": "Enabled", "Time": {"Minutes": 15}},
      "Metrics": {"Status": "Enabled", "EventThreshold": {"Minutes": 15}},
      "Destination": {"Bucket": "arn:aws:s3:::eu-west-1-uploads"}
    }]
  }'

CloudFront with Multi-Region Origins

Use CloudFront with origin groups to create an active-active CDN with automatic failover. Configure a primary origin (ALB in us-east-1) and a secondary origin (ALB in eu-west-1). CloudFront automatically fails over to the secondary origin when the primary returns 5xx errors. For static assets served from S3, configure origin groups pointing to S3 buckets in multiple regions with bidirectional replication. This adds a CDN-level resilience layer on top of your Route 53 active-active routing.

# CloudFront origin group for multi-region failover
aws cloudfront create-distribution \
  --distribution-config '{
    "Origins": {
      "Quantity": 2,
      "Items": [
        {"Id": "us-east-1", "DomainName": "alb-us-east-1.amazonaws.com"},
        {"Id": "eu-west-1", "DomainName": "alb-eu-west-1.amazonaws.com"}
      ]
    },
    "OriginGroups": {
      "Items": [{
        "Id": "multi-region-group",
        "FailoverCriteria": {"StatusCodes": {"Items": [500,502,503,504]}},
        "Members": {"Items": [{"OriginId": "us-east-1"},{"OriginId": "eu-west-1"}]}
      }]
    }
  }'

Monitoring Active-Active Health

Active-active architectures require robust monitoring to ensure both regions are healthy and traffic is balanced as expected. Key metrics: Route 53 HealthCheckPercentageHealthy per region, DynamoDB ReplicationLatency for Global Tables lag, ALB RequestCount per region to verify traffic distribution, and CloudWatch cross-account/cross-region dashboards for a unified view. Set alarms when replication lag exceeds your RPO threshold or when traffic distribution becomes severely unbalanced.

# CloudWatch alarm for DynamoDB Global Table replication lag
aws cloudwatch put-metric-alarm \
  --alarm-name 'GlobalTable-ReplicationLag-eu-west-1' \
  --metric-name ReplicationLatency \
  --namespace AWS/DynamoDB \
  --dimensions Name=TableName,Value=UserSessions Name=ReceivingRegion,Value=eu-west-1 \
  --period 60 \
  --evaluation-periods 3 \
  --threshold 5000 \
  --comparison-operator GreaterThanThreshold \
  --alarm-actions arn:aws:sns:us-east-1:123:ops-alerts

When Active-Active Is the Right Choice

Active-active is appropriate when: users are globally distributed and latency to a single region is unacceptable. RTO must be near-zero — the business cannot tolerate even minutes of downtime. High write throughput requires spreading writes across regions. Regulatory requirements mandate in-country data processing. The cost is substantially higher than other DR tiers, so only choose active-active when the business requirements and economics clearly justify it. For many workloads, Warm Standby is sufficient and far cheaper.

# Active-Active justification checklist:
# [ ] Users in 2+ continents with latency SLAs
# [ ] RTO requirement < 5 minutes
# [ ] Revenue impact of downtime justifies 2x+ cost
# [ ] Data must remain within specific regions (regulations)
# [ ] Write throughput exceeds single-region capacity

# If fewer than 2-3 boxes checked:
# Consider Warm Standby instead (lower cost, adequate RTO)

Quick Check

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

Lesson Recap

In this lesson you learned: DynamoDB Global Tables enables multi-master writes across regions for true active-active, Route 53 latency routing with health checks directs users to the nearest healthy region, and session management must be stateless or use globally replicated storage in active-active. Active-active provides near-zero RTO and RPO but at significantly higher cost. Next up we explore the Well-Architected Framework's Operational Excellence and Security pillars.

Frequently asked questions

Is the “Multi-Site Active-Active with Global Tables and Route 53” lesson free?

Yes — the full text of “Multi-Site Active-Active with Global Tables and Route 53” 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-Site Active-Active with Global Tables and Route 53”?

Run full production capacity in two or more Regions simultaneously using DynamoDB Global Tables, Aurora Global Database, and Route 53 latency routing. 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 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Multi-Site Active-Active with Global Tables and Route 53” 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. RTO, RPO, and DR Tiers
  2. Backup and Restore
  3. Pilot Light and Warm Standby
  4. Multi-Site Active-Active with Global Tables and Route 53
← Back to AWS Solutions Architect