Senior LevelCloud Computing (AWS/GCP/Azure)
How do you architect an Active-Active Multi-Region Database setup with sub-second failover?
❓ Interview Prompt: Explain Active-Active multi-region database architectures (DynamoDB Global Tables, Aurora Global Database), CRDT conflict resolution, and sub-second RTO/RPO.
Architecting a globally resilient system capable of surviving an entire AWS regional outage requires an Active-Active Multi-Region Database Architecture.
Technology Choices & Mechanics:
1
DynamoDB Global Tables:
•
Uses multi-region active-active replication. Writes to any region are asynchronously replicated to all other regions in sub-second time.
•
Conflict Resolution: Uses a Last-Writer-Wins (LWW) deterministic timestamp rule or CRDT structures to resolve concurrent cross-region write conflicts.
2
Amazon Aurora Global Database:
•
Primary region accepts writes; up to 5 secondary read-only regions replicate storage in sub-1 second.
•
Provides Managed Planned Failover (RTO < 1 min, RPO = 0) to swap primary write regions without data loss.
Code Implementation Example
hcl
# Terraform DynamoDB Global Table with multi-region active-active replication
resource "aws_dynamodb_table" "global_users" {
name = "GlobalUsers"
billing_mode = "PAY_PER_REQUEST"
hash_key = "UserId"
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"
replica { region_name = "us-east-1" }
replica { region_name = "eu-west-1" }
replica { region_name = "ap-northeast-1" }
}💡Terraform configuration for a multi-region active-active DynamoDB Global Table.
🎯 Interview Key Takeaway
Active-Active multi-region databases (DynamoDB Global Tables) replicate writes asynchronously across regions for sub-second failovers.
#Active-Active#Multi-Region#DynamoDB Global Tables#Aurora Global#Senior
Back to all Cloud Computing (AWS/GCP/Azure) Questions→