2.2.2.1. Multi-AZ and Multi-Region Deployments
2.2.2.1. Multi-AZ and Multi-Region Deployments
💡 First Principle: Multi-AZ and Multi-Region deployments enhance application availability and fault tolerance by distributing resources across isolated locations, protecting against outages.
Multi-AZ and Multi-Region deployments enhance application availability and fault tolerance by distributing resources across isolated locations, protecting against outages.
Designing for high availability and disaster recovery is critical for resilient applications. AWS's global infrastructure supports this through Regions and Availability Zones (AZs).
- Multi-AZ Deployments: A strategy that distributes resources across physically isolated Availability Zones within a single AWS Region. Each AZ is an independent data center with its own power, cooling, and networking, designed to be isolated from failures in other AZs. This protects against data center-level disruptions.
- Examples: EC2 Auto Scaling Groups across multiple AZs, Amazon RDS Multi-AZ deployments.
- Multi-Region Deployments: A strategy that extends Multi-AZ by distributing resources across geographically distinct AWS Regions. This provides the highest level of resilience, protecting against widespread regional failures or disasters.
- Examples: Amazon Route 53 latency-based routing, Amazon S3 Cross-Region Replication.
- Multi-Region databases: Aurora Global Database replicates storage-level data to secondary Regions with typical lag under one second; in a Regional outage a secondary cluster is promoted by a cross-Region failover to take writes (RPO typically seconds, RTO typically minutes). Switchover (formerly "managed planned failover") is the zero-data-loss variant for planned moves while every Region is healthy — it cannot be used when the primary Region is down. DynamoDB global tables are multi-active: every replica Region accepts reads and writes (last-writer-wins reconciliation) for low-latency global access. Cross-Region RDS read replicas are read-only until manually promoted.
Key Differences:
- "Multi-AZ": Within-region HA, protects against AZ failure, typically synchronous data.
- "Multi-Region": Cross-region DR, protects against regional disaster, typically asynchronous data.
Scenario: For high availability, an application uses an Application Load Balancer distributing traffic to EC2 instances deployed across multiple Availability Zones within a single AWS Region.
Visual: Multi-AZ vs. Multi-Region Deployments
⚠️ Common Pitfall: Deploying a multi-AZ application with a single point of failure (e.g., a single NAT Gateway in one AZ). Ensure all critical components are also multi-AZ.
Key Trade-Offs:
- High Availability vs. Cost/Complexity: Multi-AZ provides strong HA within a region, Multi-Region provides DR across regions. Multi-Region is significantly more complex and expensive due to data replication and latency.
Reflection Question: How do these deployment strategies (Multi-AZ and Multi-Region) fundamentally improve system resilience against various failure types, from localized data center outages to widespread regional disasters?