Recovery readiness with a new application - Amazon Route 53 Application Recovery Controller
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Recovery readiness with a new application

If you're designing a new application, structure it to be recovery-oriented from the start so that you can be sure to get the most from the recovery features in Amazon Route 53 Application Recovery Controller.

A recovery-oriented application consists of multiple redundant replicas, or failure-containment units, that fail independently of one another. You can set up failure-containment silos by deploying replicas that align with Amazon Availability Zone boundaries, which is easier to do if you're starting with a new application than if you need to rearchitect an existing one.

The following sections include an example that illustrates how you can design a recovery-oriented application with siloed replicas in Amazon Availability Zones. The example uses Amazon CloudFormation templates to simplify the process, as well as downloadable Amazon CloudFormation and HashiCorp Terraform templates with a sample app so that you can quickly explore setting up and using Route 53 ARC yourself.

How to create an example application

As an example, let's look at an application that routes traffic to a service that runs on Amazon Elastic Container Service (Amazon ECS), is fronted by a Network Load Balancer, and interacts with an Amazon Aurora database. You can launch this application with an Amazon CloudFormation template and provision it as one stack.

To make sure that you deploy siloed replicas that are each scoped to an Availability Zone, do the following: make sure that your application architecture uses a Network Load Balancer that is local to one replica that routes to an Amazon ECS cluster, which is also local to the replica. Then, connect these replicas by using an Amazon Route 53 weighted routing policy DNS record. Next, define separate stacks for each replica in a single Amazon CloudFormation template by using parameters in the template. (You can learn more about using nested Amazon CloudFormation structures by reading Working with nested stacks in the Amazon CloudFormation User Guide.)

You can build the application in Amazon CloudFormation by following these steps:

  1. Create a parent template that defines your Amazon managed services in each Amazon Region, but not in each Availability Zone. You might include, for example, Regional Aurora tables or Amazon S3 buckets that are in addition to the replicas that you create within each Availability Zone. You'll need to export these resources.

  2. In another template, define the Amazon resources that are scoped to a replica, such as Network Load Balancers that are scoped to an Availability Zone. Ensure that these resources use template parameters for resource configuration properties that are different in each replica.

  3. Create each replica by using the replica template, and pass in the parameters or import values from your parent template.

By using infrastructure-as-code features that support provisioning infrastructure based on dynamic parameters, you can reuse definitions in your Amazon CloudFormation template. You can see this illustrated in the example downloadable Amazon CloudFormation templates that we provide in the next section. Using parameters lets you define an application that aligns with the Region-focused design patterns in Route 53 ARC, so your application is more resilient by using about the same number of definitions in your template.

Download Amazon CloudFormation or HashiCorp Terraform templates

To help you get started using Route 53 ARC, we provide Amazon CloudFormation and HashiCorp Terraform templates, together with a sample application and step-by-step instructions, that you can download and deploy locally.

After you deploy the sample app, you can use the templates to create Route 53 ARC components, and then explore using routing controls to manage traffic flow to the app. You can adapt the templates and process for your own scenario and applications.

  • Amazon CloudFormation: To get started with a sample application and Amazon CloudFormation templates, see the README instructions here on this Amazon S3 bucket. You can learn more about using Amazon CloudFormation templates by reading Amazon CloudFormation concepts in the Amazon CloudFormation User Guide.

  • HashiCorp Terraform: To get started with a sample application and Terraform templates, see the README instructions here on this Amazon S3 bucket. You can learn more about using Terraform templates by reading the HashiCorp documentation.