Anatomy of a hot standby

What a second Region is made of, what happens to each part when the first one is impaired, and where AWS says so. Scroll to take it apart.

Scale model of two AWS Regions as stacked layers: load balancers, a fleet of servers and a database in each, requests coming down from above onto the first Region's load balancer, Route 53 and ARC on a plate above them with a dashed line of DNS queries to its name servers, a thin line from the name servers to each Region's load balancer, and a dashed line of replication between the two databases
All anatomiesBack to all anatomies

Drag to turnCtrl + scroll to zoomClick a partDrag to turnTwo fingers to move and zoomTap a part

Hot standby

Two Regions, layer by layer

Each step of the scroll changes the drawing. Every statement names the AWS page it comes from.

Step 1 of 11

One Region serves, one stands ready

Both Regions run the whole workload. Only Region A takes traffic.

“Hot standby uses an active/passive configuration where users are only directed to a single region and DR regions do not take traffic.”
AWS: Disaster recovery options in the cloud

Step 2 of 11

Full size, on purpose

Region B already runs enough capacity for the whole load, so recovery does not depend on Auto Scaling.

“You can choose to provision sufficient capacity such that the recovery Region can handle the full production load as deployed. This statically stable configuration is called hot standby”
AWS: Disaster recovery options in the cloud

Step 3 of 11

The data keeps moving

Writes go to Region A only. Changes are copied to Region B asynchronously; Aurora Global Database replicates “with typical latency of under a second”.

“With active/passive strategies, writes occur only to the primary Region.”
AWS: Disaster recovery options in the cloud

Step 4 of 11

Watching from outside

Route 53 reads the health of each Region's load balancer from its targets: Evaluate target health is set on both records. AWS advises against creating health checks for the load balancers themselves.

“If you're routing traffic to any AWS resources that you can create alias records for, don't create health checks for those resources. When you create the alias records, you set Evaluate Target Health to Yes instead.”
AWS: Active-active and active-passive failover

Step 5 of 11

Region A is impaired

A service disruption impairs Region A: its servers stop answering, its Aurora writer is not available, and replication to Region B stops. Nothing has moved yet: the name still points at Region A.

This step is the scenario, not a statement from AWS.

Step 6 of 11

Detection is part of the clock

The time to notice, to tell the right people and to declare a disaster all counts inside the recovery time objective.

“It is critical to factor in incident detection, notification, escalation, discovery and declaration into your planning and objectives”
AWS: Detection

Step 7 of 11

A person decides

Health checks or alarms could start a failover by themselves. A failover on a false alarm costs availability and data for nothing, so it is often started by hand, with every step after that automated.

“Manually initiated failover is therefore often used. In this case, you should still automate the steps for failover, so that the manual initiation is like the push of a button.”
AWS: Disaster recovery options in the cloud

Step 8 of 11

One button, many steps

A person starts an ARC Region switch plan, in its ungraceful mode for an unplanned event. Region switch runs the steps of the failover as one operation. No step has to scale Region B: it is already full size.

“For cross-Region failover, use ARC Region Switch to orchestrate the full failover as a single data plane operation with pre-flight checks.”
AWS Well-Architected: REL11-BP04

Step 9 of 11

The copy becomes the primary

The plan's Aurora Global Database step runs a failover: the Aurora cluster in Region B is promoted and starts taking writes. Writes not yet copied can be lost.

“Failover (data loss) performs a failover that might cause data loss.”
AWS: Amazon Aurora Global Database execution block

Step 10 of 11

Traffic moves

The plan's ARC routing control step turns Region A's routing control off and Region B's on. Region A's record still reads unhealthy, and Region B's now reads healthy: its routing control is on and its load balancer healthy. Route 53 answers with Region B, and requests go to its load balancer.

“This step enables you to change the state of one or more ARC routing controls to redirect your application traffic to a destination AWS Region.”
AWS: ARC routing control execution block

Step 11 of 11

What a copy cannot save

Replication may not protect against deleted or corrupted data, so backups are still needed, and should be tested regularly.

“Backup and recovery are still required and should be tested regularly.”
AWS: Disaster recovery options in the cloud

The parts

Tap one, or tap it on the model

The parts

Amazon Route 53

Answers the name, and decides which Region the answer points to.

AWS: Active-active and active-passive failover

ARC Region switch and routing control

Runs the failover as one plan, and switches the traffic from one Region to the other.

  • One plan, in steps. “Each plan includes workflows that are made up of steps. Each step runs one or more execution blocks, which Region switch runs in parallel or in sequence, to complete an application recovery.”
  • Away from the impaired Region. “A data plane in each AWS Region, so that you can execute your Region switch plan without taking a dependency on the Region that you’re deactivating.”
  • For an unplanned event. The plan runs in its ungraceful mode, which “uses only the necessary steps and actions.” AWS: About Region switch
  • Turned by the plan. The plan's routing control step “enables you to change the state of one or more ARC routing controls to redirect your application traffic to a destination AWS Region.” AWS: ARC routing control execution block
  • On-off switches. “Routing controls are simple on-off switches that enable you to switch your client traffic from one Regional replica to another.” AWS: Routing control in ARC
  • Spread across Regions. “Each cluster in ARC is a data plane of endpoints in five AWS Regions.” AWS: Routing control in ARC
  • Not a health check. “It's important to note that routing controls are not themselves health checks that monitor the underlying health of endpoints.” AWS: About routing control
AWS: Region switch in ARC

Evaluate target health

Route 53 reads each load balancer's health from its targets, and answers with a healthy record when there is one.

  • Yes, for a load balancer. Setting Evaluate target health to Yes “allows Route 53 to route traffic away from unhealthy resources.” AWS: Values specific for simple alias records
  • When it reads unhealthy. “If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources.”
  • No checks on the load balancers. “If you're routing traffic to any AWS resources that you can create alias records for, don't create health checks for those resources.” AWS: Active-active and active-passive failover
  • With the routing control. Each Region's record also carries a routing control health check: “For example, to control traffic failovers across two load balancers, one in each of two Regions, you create two routing control health checks and associate them with two DNS records, for example, Alias records with failover routing policies, with the domain names of the respective load balancers.” AWS: About routing control
  • Both must be healthy. “If you associate a health check with an alias record and also select Yes for Evaluate Target Health, both must evaluate to true.”
  • If it were automatic. For automated failover, AWS asks for health checks that look like real use: “Design health checks that are representative of user experience and based on Key Performance Indicators.” Here a person starts the failover. AWS: Detection
AWS: Values specific for failover alias records

Elastic Load Balancing

The front door of each Region.

  • Already there. Creating a load balancer during an event is a control plane action. AWS asks to “use as few control plane operations as possible.”
  • How Route 53 reads it. With Evaluate target health set to Yes, “Route 53 routes queries to the load balancer based on the health of the target groups that are associated with the load balancer”. AWS: Values specific for failover alias records
AWS Well-Architected: REL11-BP04

The fleet

Amazon EC2 Auto Scaling groups, spread across Availability Zones in each Region.

  • Full size in both Regions. “provision sufficient capacity such that the recovery Region can handle the full production load as deployed.”
  • No scaling during the event. “Because Auto Scaling is a control plane activity, taking a dependency on it will lower the resiliency of your overall recovery strategy.”
  • Inside a Region. Auto Scaling “scales deployment of EC2 instance across Availability Zones within an AWS Region, providing resiliency within that Region.”
AWS: Disaster recovery options in the cloud

Aurora Global Database

The writer in Region A, a copy in Region B that can be promoted.

  • The lag. It can replicate to the secondary Region “with typical latency of under a second”. AWS: Disaster recovery options in the cloud
  • An outage in Region A. In an unexpected outage of its primary Region, “your primary Aurora DB cluster and its writer node aren't available, and the replication between the primary and secondary DB clusters stops.”
  • Unplanned: failover. “The RPO for this approach is typically a non-zero value measured in seconds.”
  • Planned: switchover. “RPO is 0 (no data loss).”
  • How long. “For Aurora Global Database, RTO can be in the order of minutes.”
  • When Region A is back. Aurora names two failover methods for an unplanned outage. After a managed failover, the one AWS recommends for disaster recovery, “As soon as that old primary Region is healthy and available again, Aurora automatically adds it back to the global cluster as a secondary Region.” After a manual failover, the global database is created again.
AWS: Switchover or failover in Aurora Global Database

Backups

What protects data that was deleted or corrupted and then copied.

AWS Well-Architected: REL13-BP02