62. Route 53 Failover Routing Policy

Failover routing policies are used when we want to create an active/ passive set up. For example, you may want your primary site to be in EU-WEST-2 and secondary DR site in AP-SOUTHEAST-2. Route 53 will monitor the health of primary site using a health check. A health check monitors the health of your end points.
Users are connecting to Route 53 by doing a DNS request. Active site is at EU-WEST-2 and passive site is at AP-SOUTHEAST-2. If there is a failure in EU-WEST-2 region then the traffic will automatically be send to AP-SOUTHEAST-2.

Question 1:
As a Solutions Architect, you are building an application that uses AWS. The application has primary and secondary configurations across two regions, each utilizing ELB, Auto scaling, and EC2 instances.
Choose the best Route 53 routing policy if your primary infrastructure goes down.
Options:
A. Weighted routing
B. Simple routing
C. Multi-value answer routing
D. Failover routing
Answer: D
Explanation
You can use the Failover routing policy to create an active-passive failover configuration. You can create primary and secondary failover records of the same name and type and associate health checks with each to achieve a cross-region failover configuration. Option 4 is the correct answer.
Amazon Route 53 Health Check monitors the health and performance of web applications, web servers, and other resources. Route 53 monitors performance in one of the following ways:
1. Health check for specified resources such as web servers
2. Status of other health checks such as ELB
3. Amazon CloudWatch Alarm Status
Option 1 is incorrect. Weighted routing allows you to route traffic to multiple resources with a custom ratio.
Option 2 is incorrect. Simple routing is used when a domain has a single resource that performs a particular function. For example, a single web server that serves content to a website.
Option 3 is incorrect. Multi-value answer routing is used when Route 53 responds to DNS queries with up to eight randomly selected healthy records.

Question 2:
A company has deployed a new website on Amazon EC2 instances behind an Application Load Balancer (ALB). Amazon Route 53 is used for the DNS service. The company has asked a Solutions Architect to create a backup website with support contact details that users will be directed to automatically if the primary website is down.
How should the Solutions Architect deploy this solution cost-effectively?
Options:
A. Deploy the backup website on EC2 and ALB in another Region and use Route 53 health checks for failover routing
B. Configure a static website using Amazon S3 and create a Route 53 weighted routing policy” is incorrect
C. Configure a static website using Amazon S3 and create a Route 53 failover routing policy
D. Create the backup website on EC2 and ALB in another Region and create an AWS Global Accelerator endpoint
Answer: C
Explanation
The most cost-effective solution is to create a static website using an Amazon S3 bucket and then use a failover routing policy in Amazon Route 53. With a failover routing policy users will be directed to the main website as long as it is responding to health checks successfully.
If the main website fails to respond to health checks (its down), Route 53 will begin to direct users to the backup website running on the Amazon S3 bucket. It’s important to set the TTL on the Route 53 records appropriately to ensure that users resolve the failover address within a short time.
CORRECT: “Configure a static website using Amazon S3 and create a Route 53 failover routing policy” is the correct answer.
INCORRECT: “Configure a static website using Amazon S3 and create a Route 53 weighted routing policy” is incorrect. Weighted routing is used when you want to send a percentage of traffic between multiple endpoints. In this case all traffic should go to the primary until if fails, then all should go to the backup.
INCORRECT: “Deploy the backup website on EC2 and ALB in another Region and use Route 53 health checks for failover routing” is incorrect. This is not a cost-effective solution for the backup website. It can be implemented using Route 53 failover routing which uses health checks but would be an expensive option.
INCORRECT: “Create the backup website on EC2 and ALB in another Region and create an AWS Global Accelerator endpoint” is incorrect. Global Accelerator is used for performance as it directs traffic to the nearest healthy endpoint. It is not useful for failover in this scenario and is also a very expensive solution.

Question 3:
A manufacturing company receives unreliable service from its data center provider because the company is located in an area prone to natural disasters. The company is not ready to fully migrate to the AWS Cloud, but it wants a failover environment on AWS in case the on-premises data center fails. The company runs web servers that connect to external vendors. The data available on AWS and on-premises must be uniform.
Which of the following solutions would have the LEAST amount of downtime?
• Set up a Route 53 failover record. Execute an AWS CloudFormation template from a script to provision EC2 instances behind an Application Load Balancer. Set up AWS Storage Gateway with stored volumes to back up data to S3
• Set up a Route 53 failover record. Run an AWS Lambda function to execute an AWS CloudFormation template to launch two EC2 instances. Set up AWS Storage Gateway with stored volumes to back up data to S3. Set up an AWS Direct Connect connection between a VPC and the data center
• Set up a Route 53 failover record. Run application servers on EC2 instances behind an Application Load Balancer in an Auto Scaling group. Set up AWS Storage Gateway with stored volumes to back up data to S3 (Correct)
• Set up a Route 53 failover record. Set up an AWS Direct Connect connection between a VPC and the data center. Run application servers on EC2 in an Auto Scaling group. Run an AWS Lambda function to execute an AWS CloudFormation template to create an Application Load Balancer
Explanation
Correct option:
Set up a Route 53 failover record. Run application servers on EC2 instances behind an Application Load Balancer in an Auto Scaling group. Set up AWS Storage Gateway with stored volumes to back up data to S3
If you have multiple resources that perform the same function, you can configure DNS failover so that Route 53 will route your traffic from an unhealthy resource to a healthy resource.
Elastic Load Balancing is used to automatically distribute your incoming application traffic across all the EC2 instances that you are running. You can use Elastic Load Balancing to manage incoming requests by optimally routing traffic so that no one instance is overwhelmed. Your load balancer acts as a single point of contact for all incoming web traffic to your Auto Scaling group.
AWS Storage Gateway is a hybrid cloud storage service that gives you on-premises access to virtually unlimited cloud storage. It provides low-latency performance by caching frequently accessed data on-premises while storing data securely and durably in Amazon cloud storage services. Storage Gateway optimizes data transfer to AWS by sending only changed data and compressing data. Storage Gateway also integrates natively with Amazon S3 cloud storage which makes your data available for in-cloud processing.
Incorrect options:
Set up a Route 53 failover record. Execute an AWS CloudFormation template from a script to provision EC2 instances behind an Application Load Balancer. Set up AWS Storage Gateway with stored volumes to back up data to S3
Set up a Route 53 failover record. Run an AWS Lambda function to execute an AWS CloudFormation template to launch two EC2 instances. Set up AWS Storage Gateway with stored volumes to back up data to S3. Set up an AWS Direct Connect connection between a VPC and the data center
Set up a Route 53 failover record. Set up an AWS Direct Connect connection between a VPC and the data center. Run application servers on EC2 in an Auto Scaling group. Run an AWS Lambda function to execute an AWS CloudFormation template to create an Application Load Balancer
AWS CloudFormation is a convenient provisioning mechanism for a broad range of AWS and third-party resources. It supports the infrastructure needs of many different types of applications such as existing enterprise applications, legacy applications, applications built using a variety of AWS resources, and container-based solutions.
These three options involve CloudFormation as part of the solution. Now, CloudFormation takes time to provision the resources and hence is not the right solution when LEAST amount of downtime is mandated for the given use case. Therefore, these options are not the right fit for the given requirement.