Sub topic 15
When Multi-AZ Is Not Enough: The Multi-Region Boundary
This chapter assumes you have read the earlier chapters on failure domains, load balancing, Auto Scaling, RDS Multi-AZ and Aurora, static stability, and testing. It also assumes you can read CloudFormation YAML and run AWS CLI commands. It covers what a multi-AZ design cannot protect against, how to decide whether a second Region is justified, and what a multi-Region design costs you.
What multi-AZ protects against
An Availability Zone (AZ) is one or more discrete data centers with independent power, cooling, and networking inside a Region. A multi-AZ design survives the loss of one of those failure domains. Typical causes are a power event, a network fault, or a hardware problem confined to one AZ.
Every AZ in a Region still shares things:
- The Region's regional service endpoints and the control planes behind them.
- Your account, your IAM configuration, and your infrastructure-as-code.
- Your application code, your configuration, and your data.
When one of these shared things fails or is damaged, all of your AZs fail together.
Failures that cross every AZ
| Failure | Why multi-AZ does not help |
|---|---|
| Regional service impairment | A regional AWS service you depend on degrades in every AZ at once. |
| Bad deployment | The same faulty build rolls out to instances in every AZ. |
| Data corruption or deletion | Synchronous replication copies the bad write to the standby. |
| Credential or account compromise | An attacker with valid credentials acts on resources in every AZ. |
| Misconfiguration | A wrong security group, route, or IAM policy applies Region-wide. |
| Quota exhaustion | Service quotas are per Region, so every AZ draws on the same limit. |
Only the first row is a reason to add a second Region. The other rows need different controls: staged deployments with automatic rollback, point-in-time recovery and backups, least-privilege access, and separate accounts. Multi-Region replication can make some of them worse. A deletion replicated to a second Region is deleted in both.
Deciding whether you need a second Region
Start from requirements, not from the architecture. Multi-Region is justified when at least one of these is true:
- Availability target. Your recovery time objective (RTO) or recovery point objective (RPO) is tighter than you can meet by restoring in the same Region after a regional event.
- Regulatory or contractual resilience. A regulator, customer contract, or internal policy requires a workload to survive the loss of a Region.
- Latency. Users are spread across continents and a single Region cannot serve them acceptably. This is a performance reason, not a resilience reason, but it often produces the same design.
- Data residency. Different jurisdictions need data kept in different Regions. This is partitioning rather than failover.
If none applies, a well-tested multi-AZ design with cross-Region backups is usually the right stop. Regional events are rare. The added complexity of a second Region causes outages of its own, and teams often underestimate that.
Multi-Region strategies
These four patterns trade cost against recovery speed. The times are typical orders of magnitude, not guarantees. Measure your own.
| Strategy | What runs in the second Region | Typical RTO | Typical RPO | Relative cost |
|---|---|---|---|---|
| Backup and restore | Only backups | Hours | Hours to minutes | Lowest |
| Pilot light | Replicated data, compute switched off | Tens of minutes | Seconds to minutes | Low |
| Warm standby | Scaled-down full stack, running | Minutes | Seconds to minutes | Medium |
| Active-active | Full stack serving live traffic | Seconds to minutes | Near zero to seconds | Highest |
Pilot light keeps the data layer live and the application tier defined but stopped. Warm standby keeps a small but running copy that you scale up on failover. Active-active serves traffic from both Regions all the time, which forces you to solve write conflicts.
Replicating the data tier
Data is the hard part. Replication across Regions is asynchronous because the speed of light adds tens to hundreds of milliseconds per round trip. You accept a nonzero RPO.
- Aurora Global Database replicates storage-level changes to secondary Regions, typically with lag of about a second. A managed failover promotes a secondary cluster. Check the replication lag metric, because it is your effective RPO.
- RDS cross-Region read replicas use asynchronous engine replication. You promote a replica manually, and promotion breaks replication.
- DynamoDB global tables are multi-writer. Concurrent writes to the same item resolve by last writer wins, so your data model must tolerate that.
- S3 Cross-Region Replication copies new objects asynchronously. It needs versioning on both buckets. It does not copy objects that existed before you enabled it unless you use batch replication.
- Supporting data also needs a plan: ECR image replication, AWS KMS multi-Region keys, and Secrets Manager secret replication. A recovery Region without your container images or decryption keys cannot start.
Routing traffic between Regions
Users need one name that leads to a healthy Region. Route 53 failover records can do this with a health check on the primary endpoint. The example below defines a primary and a secondary record for app.example.com.
Resources:
PrimaryHealthCheck:
Type: AWS::Route53::HealthCheck
Properties:
HealthCheckConfig:
Type: HTTPS
FullyQualifiedDomainName: primary.example.com
ResourcePath: /health
RequestInterval: 30
FailureThreshold: 3
PrimaryRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneName: example.com.
Name: app.example.com.
Type: CNAME
TTL: "60"
SetIdentifier: primary
Failover: PRIMARY
HealthCheckId: !Ref PrimaryHealthCheck
ResourceRecords:
- primary.example.com
SecondaryRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneName: example.com.
Name: app.example.com.
Type: CNAME
TTL: "60"
SetIdentifier: secondary
Failover: SECONDARY
ResourceRecords:
- secondary.example.comWith these settings, Route 53 marks the primary unhealthy after three failed checks at 30-second intervals, which is about 90 seconds. Resolvers then cache the old answer for up to the 60-second TTL. Budget at least two to three minutes of detection and propagation time, and some clients cache longer than the TTL.
Two design points matter here:
- Health checks answer one question.
/healthshould reflect whether the Region can serve users. If it checks only the web process, traffic may fail over to a Region whose database is not ready. If it checks every dependency, a minor dependency failure can cause an unnecessary failover. - Prefer the data plane for failover. The Route 53 control plane, which creates and edits records, is hosted in us-east-1. Health-check-driven failover uses the data plane, which is far more available. Apply the static stability rule from the earlier chapter: do not make recovery depend on calling a control plane during the event. Amazon Application Recovery Controller (ARC) routing controls follow this principle and use a highly available data-plane API for manual failover decisions.
Costs and failure modes of going multi-Region
- Cost. You pay for duplicate compute, data storage, inter-Region data transfer, and replication traffic. Active-active can cost close to double.
- Operational load. Deployments, schema changes, secrets, and configuration must reach every Region in a consistent order. Drift between Regions is the usual reason a failover does not work.
- Untested failover. A standby Region you have never run traffic through is an assumption. Exercise it regularly, as covered in the testing chapter, including failing back.
- Split brain. If both Regions believe they are primary and accept writes, you must reconcile divergent data. Define one authority for writes, or accept conflict resolution.
- Quota and capacity. Service quotas are per Region. Confirm the secondary Region has the quotas to carry full load. Capacity there is not guaranteed unless you reserve it, for example with On-Demand Capacity Reservations.
- Failback. Returning to the original Region needs its own plan, because data has diverged since failover.
Exercise
Your team runs a payments service on RDS Multi-AZ. The business requires an RTO of 5 minutes and an RPO of under 1 minute if an entire Region is lost. Which strategy from this chapter is the minimum that fits, and name two things besides the database that must exist in the second Region before the event?
Show answer
Warm standby fits the 5-minute RTO, because pilot light usually takes tens of minutes to start compute. The database must use cross-Region replication with lag under 1 minute, such as Aurora Global Database. Two other things that must already exist in the second Region are the container images or AMIs (for example through ECR replication) and the encryption keys and secrets (KMS multi-Region keys and replicated Secrets Manager secrets). Sufficient service quotas and a health-check-driven DNS failover record also qualify.
Exercise
Why does S3 versioning together with Cross-Region Replication not replace a backup strategy?
Show answer
Replication copies changes, including deletes and overwrites, to the other bucket. Versioning keeps prior versions so you can recover from an overwrite, but you still need protection against deleted versions and account-level compromise. Use features such as AWS Backup with a vault lock or Object Lock to keep immutable copies.