Multi-site active/active
Two Regions, both serving
Each step of the scroll changes the drawing. Every statement names the AWS page it comes from.
Two Regions that both take traffic: what each part does, how writes can be handled, what happens when one Region is impaired, and where AWS says so. Scroll to take it apart.
Drag to turnCtrl + scroll to zoomClick a partDrag to turnTwo fingers to move and zoomTap a part
Multi-site active/active
Each step of the scroll changes the drawing. Every statement names the AWS page it comes from.
Step 1 of 12
The workload runs in Region A and Region B at the same time, and both serve users. Neither Region is kept only for recovery.
“Multi-site active/active serves traffic from all regions to which it is deployed, whereas hot standby serves traffic only from a single region, and the other Region(s) are only used for disaster recovery.”AWS: Disaster recovery options in the cloud
Step 2 of 12
Amazon Route 53 or AWS Global Accelerator decides which Region each user goes to: by a percentage for each Region, or, with Route 53, by other policies such as geoproximity or latency.
“For the active/active strategy here, both of these services also enable the definition of policies that determine which users go to which active regional endpoint. With AWS Global Accelerator you set a traffic dial to control the percentage of traffic that is directed to each application endpoint. Amazon Route 53 supports this percentage approach, and also multiple other available policies including geoproximity and latency based ones.”AWS: Disaster recovery options in the cloud
Step 3 of 12
A common design: each user's reads are served by the Region closest to them, from that Region's own copy of the data.
“It is common to design user reads to be served from the Region closest to them, known as read local.”AWS: Disaster recovery options in the cloud
Step 4 of 12
AWS offers options for writes. With write local, writes go to the closest Region too; DynamoDB global tables enable it, so both Regions take writes.
“A write local strategy routes writes to the closest Region (just like reads). Amazon DynamoDB global tables enables such a strategy, allowing read and writes from every region your global table is deployed to.”AWS: Disaster recovery options in the cloud
Step 5 of 12
In the default mode of DynamoDB global tables, multi-Region eventual consistency (MREC), if the same item is changed in both Regions at the same time, DynamoDB keeps the change with the latest internal timestamp, and every replica ends up with that version.
“If the same item is modified in multiple Regions simultaneously, DynamoDB will resolve the conflict by using the modification with the latest internal timestamp on a per-item basis, referred to as a "last writer wins" conflict resolution method. An item will eventually converge in all replicas to the version created by the last write.”AWS: How DynamoDB global tables work
Step 6 of 12
With write global, every write goes to the same Region, as with Aurora Global Database; if that Region is impaired, another is promoted.
“A write global strategy routes all writes to a single Region. In case of failure of that Region, another Region would be promoted to accept writes.”AWS: Disaster recovery options in the cloud
Step 7 of 12
A service disruption stops Region A from answering. Region B keeps serving its own users.
This step is the scenario, not a statement from AWS.
Step 8 of 12
In multi-site active/active the workload already runs in Region B too, so there is no failover.
“With multi-site active/active, because the workload is running in more than one Region, there is no such thing as failover in this scenario.”AWS: Disaster recovery options in the cloud
Step 9 of 12
With Evaluate target health set to Yes on each Region's alias record, Route 53 follows the health of each load balancer's target groups. With Region A impaired, if its load balancer's target groups hold only unhealthy targets, that load balancer is considered unhealthy, and Route 53 routes queries to other resources: here, Region B's load balancer.
“If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources.”AWS: AliasTarget (Route 53 API Reference)
Step 10 of 12
AWS says to test it: with Region A impaired, can Region B handle all the traffic?
“Disaster recovery testing in this case would focus on how the workload reacts to loss of a Region: Is traffic routed away from the failed Region? Can the other Region(s) handle all the traffic?”AWS: Disaster recovery options in the cloud
Step 11 of 12
Changes Region A took but had not yet copied are copied to Region B when Region A's replica is healthy again.
“In the unlikely event a replica in a MREC global table becomes isolated or impaired, any data not yet replicated to other Regions will be replicated when the replica becomes healthy.”AWS: How DynamoDB global tables work
Step 12 of 12
In multi-site active/active, backup and recovery are still needed. Data that was corrupted or deleted comes back only to a point before the damage was discovered.
“Backup and recovery are still required and should be tested regularly. It should also be noted that recovery times for a data disaster involving data corruption, deletion, or obfuscation will always be greater than zero and the recovery point will always be at some point before the disaster was discovered.”AWS: Disaster recovery options in the cloud
Tap one, or tap it on the model
Answers the name with a Region, and leaves out a Region whose load balancer is unhealthy.
The front door of each Region, both taking requests.
Amazon EC2 Auto Scaling groups, serving users in both Regions.
The data, in both Regions. Each Region reads and writes its own replica.
What protects data that was deleted or corrupted and then copied.