Sub topic 9
Warm standby: a scaled-down running copy
This chapter assumes you know Regions, Auto Scaling groups, Application Load Balancers (ALBs), and Aurora or DynamoDB basics. It also assumes you have met RTO, RPO, and pilot light in earlier chapters.
What warm standby keeps running
Warm standby is a complete copy of the workload running in the DR Region at reduced size. Every tier is up: load balancer, application servers, and a replicated database. The fleet is smaller than production, for example 2 instances against 8.
Pilot light differs here. In pilot light, only the data layer runs, and you must launch compute during recovery. In warm standby, compute is already running, so recovery means scaling up instead of building.
| Aspect | Pilot light | Warm standby |
|---|---|---|
| Compute in DR Region | Off or absent | Running at minimal size |
| Database | Replicated | Replicated |
| Can serve requests now | No | Yes, at low capacity |
| Typical recovery time | Tens of minutes | Minutes |
How a failover works
The steps are short because most resources already exist.
The three actions are:
- Redirect traffic. Use a Route 53 failover record pair like the one in the traffic failover chapter. Keep the TTL low, such as 60 seconds, so clients pick up the change quickly.
- Promote the data layer. With an Aurora global database, make the DR cluster the writer.
- Scale compute. Raise the DR Auto Scaling group from its standby size to production size.
# Scale the standby Auto Scaling group up from its minimal size
aws autoscaling update-auto-scaling-group \
--region us-west-2 \
--auto-scaling-group-name app-dr \
--min-size 4 \
--desired-capacity 4 \
--max-size 12
# Unplanned failover: promote the DR cluster, accepting possible data loss
aws rds failover-global-cluster \
--region us-west-2 \
--global-cluster-identifier app-global \
--target-db-cluster-identifier arn:aws:rds:us-west-2:111122223333:cluster:app-dr-cluster \
--allow-data-loss--allow-data-loss is needed when the primary Region is unreachable. Writes that had not replicated yet are lost, and that gap is your actual RPO. For a planned drill, use aws rds switchover-global-cluster instead, which waits for the replicas to catch up.
Common errors
- Standby fleet too small to absorb the first requests. Traffic can arrive before scaling finishes. Pre-warm the ALB and set the standby minimum high enough to handle early load.
- Scaling blocked by quotas. Service quotas are per Region. Raise EC2 vCPU limits in the DR Region before you need them.
- Configuration drift. The standby runs code and AMIs that nobody deploys to. Release pipelines must deploy to both Regions, or the standby fails on old versions.
- Capacity not guaranteed. On-demand capacity in a failing Region's neighbor can be tight during a large event. Consider On-Demand Capacity Reservations for critical instance types.
- Hard-coded Region values. Endpoints, KMS keys, and secrets must exist in the DR Region, or the app starts and then errors.
When warm standby fits
Choose warm standby when the RTO is in minutes and the RPO is seconds to minutes, but active/active is too costly or complex. You pay for the always-on standby fleet plus replication and cross-Region transfer. That cost is above pilot light and well below running two full-size Regions.
A useful side benefit is that the standby can receive test traffic or run smoke tests continuously, so you find broken deployments before a real disaster.
Exercise
A team runs warm standby with 2 instances in us-west-2 and 8 in production in us-east-1. During a Region outage, Route 53 switches to the DR record, but users see errors and slow responses for several minutes. Name two likely causes and a fix for each.
Show answer
First, the DR fleet is too small for full traffic, and scaling takes time. Fix it by scaling the Auto Scaling group to production size as part of the runbook, or by raising the standby minimum. Second, the Aurora DR cluster is still a read-only secondary, so writes fail. Fix it by promoting it with failover-global-cluster. Quota limits or missing Region-specific secrets are also acceptable causes.