Design a multi-region infrastructure rollout: choose primary/secondary regions, data replication strategy, traffic routing, failure domains, IaC workflows, testing/rollback plans, and observability for latency and consistency.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
This design assumes an AWS-based, highly available web application (e.g., microservices on EKS with RDS Aurora for the database, ElastiCache Redis for caching, and S3 for static assets). It prioritizes low-latency global access, strong consistency where needed, and 99.99% uptime SLA. The architecture uses active-passive failover with read replicas for scalability.
1. Regions Selection
Primary Region: us-east-1 (N. Virginia) – High capacity, low latency for North America/East Coast users, AWS's most resilient region.
Rationale: Proximity to 70% of global users (US/EU focus). Add ap-southeast-2 (Sydney) as tertiary for APAC if scaling. Avoid correlated failure zones (e.g., no US-East pairs).
Region
Role
User Coverage
Cross-Region Latency
us-east-1
Primary (R/W)
Americas
Baseline
eu-west-1
Secondary (RO)
EMEA
~80ms
2. Data Replication Strategy
Database (RDS Aurora PostgreSQL/MySQL Global Database):
Primary cluster in us-east-1 (multi-AZ: AZ a/b/c).
Secondary cluster in eu-west-1 with managed cross-region read replicas (auto-sync <1s lag).
Consistency Model: Strong read-after-write in primary; eventual consistency for replicas (use aurora_global_db_replication_status for lag monitoring).
Failover: Promote secondary in <60s via AWS Console/API; app reads route to nearest replica.
Cache (ElastiCache Redis):
Global replication via Redis CRDB or ElastiCache with cross-region replication groups.
TTL-based invalidation + write-through from primary DB.
Other Data:
S3 Cross-Region Replication (CRR) for assets/logs (one-way: primary → secondary).
DynamoDB Global Tables for NoSQL needs (multi-master active-active if required).
Backup: Automated snapshots with cross-region copy; point-in-time recovery (PITR) up to 35 days.
3. Traffic Routing
Global DNS: Amazon Route 53 with Latency-Based Routing + Health Checks.
Route api.example.com to regional ALBs (Application Load Balancers).
Failover Policy: Primary → Secondary on 30s health check failure.
Edge Caching: CloudFront CDN with regional origins (us-east-1/eu-west-1).
Behaviors: Cache static assets; origin failover for dynamic.
Service Mesh (App Mesh or Istio on EKS): Cross-region traffic shadowing for testing.
Logging: Centralized via CloudWatch Logs Insights + OpenSearch.
Alerts: SNS → PagerDuty; SLO tracking with Lightstep.
Probing: Global synthetic monitors (e.g., from eu-central-1, ap-southeast-1).
This design achieves RTO <60s, RPO 0 (sync replication), and scales to 100k+ RPS. Total cost: ~$5k/mo for prod (optimize with Savings Plans). Deploy via provided Terraform snippets or customize for GCP/Azure equivalents (e.g., GKE + AlloyDB). Questions?