In this video, you’ll see how you can use AWS Resilience Hub with microservices.
Using Resilience Hub, you can scan microservices in an application,
garner recommendations for Amazon Elastic Container Service (Amazon ECS),
and perform an ECS-specific resilience test.
This is AWS Resilience Hub, which provides a central place to define,
validate, and track the resilience of your applications on AWS.
ECS is now completely supported within Resilience Hub.
We’ll look at some new features that were released.
Let’s start by adding an application.
We’ll add a CloudFormation stack.
In this case, we’ll choose the Services stack.
Let’s name it microservices.
The new scheduled assessment feature will assess our application daily,
without any manual intervention.
Next, let’s identify the resources we want to review for this application.
We’ll include a Lambda function, an ECS service, and an API gateway.
Next, let’s select a resiliency policy.
Resiliency policies define the Recovery Time Objective (RTO)
and Recovery Point Objective (RPO) used to measure an application's
resiliency to certain disruption types.
For our purposes, we’ll choose the Mission critical policy.
Next, let’s review the information and publish the application.
Now let’s take a look at the deployed application.
The assessments for the application show that our policy has been breached,
indicating potential resilience weaknesses.
Let’s look at recommendations on how to improve our microservices architecture.
We can view recommendations for each application component.
Currently, we are looking at the recommendations for the API gateway.
We can see the changes we need to make to achieve the lowest possible
RTO and RPO in the event of an Availability Zone disruption.
The changes include configuring Route53 to route requests to the next
available region, and deploying the API gateway in a different region.
The estimated cost is $0.00 per month, and the architecture type is MultiSite.
Next, let’s look at the recommendations for the Lambda function.
As you can see, the changes include making users deploy Lambda using an
S3 bucket, deploying Lambda into an alternative region, and making users use
failover routing using a global service (Route53).
These changes will enable us to get as close as possible to our target RTO and
RPO, but our resiliency policy is expected to remain breached.
The estimated cost is $252.00 per month, and the architecture type is MultiSite.
Next, let’s look at the recommended changes for the ECS service.
We have three optimization options.
In this case, the recommended changes for each option are the same because
we need to get the ECS service in a MultiSite architecture type with another region available.
The changes include adding a service replication in another region and
configuring ECR Replication to copy images to ECR in other regions.
These changes are expected to make the RTO and RPO compliant with our policy.
Now let’s look at the operational recommendations.
We can see three alarms that have been deployed as part of the ECS service.
Let’s expand the Description column to see what they are.
We can also see API Gateway, Lambda, and Synthetic canary alarms.
Next, let’s view the standard operating procedures (SOPs).
Each SOP contains a prescriptive set of steps designed to efficiently recover our
application in the event of an outage or alarm.
Here, we can see an SOP for scaling the ECS Services,
which was recently added to Resilience Hub.
This SOP applies, if provided, new CPU, RAM, and Number of task values
through creating a new version of the existing task definition assigned to the given service.
If the new task definition is explicitly provided, the SOP ignores the CPU and RAM parameters.
There are also Lambda SOPs for testing Lambda behavior, changing memory
size, switching the alias of Lambda functions to another version, changing
the execution time limit, and changing Provisioned Concurrency.
Next, let’s look at the fault injection experiment templates.
Fault injection experiments are run to measure the resiliency of AWS
resources and the amount of time it takes to recover from application,
infrastructure, availability zone, and AWS Region outages.
The first template simulates a case when ECS has failing tasks,
to evaluate application resiliency.
The second template tests Lambda
behavior when hitting a ReservedConcurrentExecutions value.
Thanks to its latest release, Resilience Hub now fully supports ECS.
You’ve just seen how you can use AWS Resilience Hub with microservices.
You can learn more about this topic in the description and links for this video.
Thanks for watching. Now it’s your turn to try.