Request Based AutoScaling using AWS Target Tracking Scaling Policies

Request Based AutoScaling using AWS Target Tracking Scaling Policies

Request Based AutoScaling using AWS Target Tracking Scaling Policies. As the documentation explains, “With target tracking scaling policies, you select a metric and set a target value. Amazon ECS Service Auto Scaling creates and manages the CloudWatch alarms that trigger the scaling policy and calculates the scaling adjustment based on the metric and the target value.”


Traditionally, we have always known about autoscaling policies which help scale our infrastructure horizontally. These policies are generally configured to perform the scaling activities based on CloudWatch alarms. These alarms are generally known to trigger based on CPU and/or memory utilization.

However, in the microservices world especially for high and unpredicted traffic applications, these two metrics are just not enough to be able to confidently scale the services up and down. There are so many factors that come into play such as:

  • How many transactions per second (TPS) is each container able to handle?
  • How many concurrent open connections can our applications HTTPClient library handle per container?
  • How many concurrent DB connections can be opened per container (connection pooling)?

With such challenges, organizations tend to build their own custom scaling policies, as the defacto infrastructure metrics based scaling becomes less relevant.

In 2017 AWS launched  TargetTracking scaling policies which allow users to use metrics such as requests per target, custom metrics, and a lot more than just the traditional CPU and Memory. The aim of this article is to demonstrate how these can be used on applications running in ECS (Fargate).

Our PoC application diagram

As shown in the above image, our application is a simple httpd container that is running on ECS Fargate. The aim of this PoC is to demonstrate how we can use request based scaling in combination with TargetTracking scaling policies to scale out our application based on the number of requests per container.

autoscaling aws microservices devops

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

What is AWS DevOps? - AWS DevOps Tutorial

What is AWS DevOps? - AWS DevOps Tutorial. In this blog on what is AWS DevOps, you will learn about AWS & DevOps along with the implementation of the concepts of DevOps with the help of AWS cloud platform.

AWS DevOps Tutorial For Beginners | AWS DevOps Training | AWS DevOps Integration

AWS DevOps Tutorial will help you understand what is Continuous Integration and Continuous Deployment through the various tools & services of the AWS suite. This tutorial also explains how to achieve Continuous Integration & Deployment through AWS CodePipeline & EC2 through the means of a Hands-On session by the end of which you will learn how to deploy a demo application using AWS.

AWS DevOps Services | DevOps Tools on AWS | AWS CodePipeline | AWS CodeDeploy

🔵 Intellipaat AWS DevOps Course: this AWS DevOps Services video, you will learn everything abou...

AWS DevOps vs Azure DevOps | Difference Between AWS Devops And Azure Devops

This Edureka "AWS DevOps vs Azure DevOps" video will give a detailed comparison of how AWS and Azure fare in handling and supporting DevOps approach on the respective cloud platforms along with latest trends and numbers in the domain.

How to Extend your DevOps Strategy For Success in the Cloud?

DevOps and Cloud computing are joined at the hip, now that fact is well appreciated by the organizations that engaged in SaaS cloud and developed applications in the Cloud. During the COVID crisis period, most of the organizations have started using cloud computing services and implementing a cloud-first strategy to establish their remote operations. Similarly, the extended DevOps strategy will make the development process more agile with automated test cases.