Recovery readiness with a new application - Amazon Route 53 Application Recovery Controller

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 AWS 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 AWS Availability Zones. The example uses AWS CloudFormation templates to simplify the process, as well as downloadable AWS CloudFormation and HashiCorp Terraform templates with a sample app so that you can quickly explore setting up and using Application Recovery Controller 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 AWS 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 AWS CloudFormation template by using parameters in the template. (You can learn more about using nested AWS CloudFormation structures by reading Working with nested stacks in the AWS CloudFormation User Guide.)

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

  1. Create a parent template that defines your AWS managed services in each AWS 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 AWS 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 AWS CloudFormation template. You can see this illustrated in the example downloadable AWS 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 Application Recovery Controller, so your application is more resilient by using about the same number of definitions in your template.

Download AWS CloudFormation or HashiCorp Terraform templates

To help you get started using Application Recovery Controller, we provide AWS 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 Application Recovery Controller structures, 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.

  • AWS CloudFormation: To get started with a sample application and AWS CloudFormation templates, see the README instructions here on this Amazon S3 bucket. You can learn more about using AWS CloudFormation templates by reading AWS CloudFormation concepts in the AWS 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.