Guide to Amazon ECS Cluster Auto Scaling

How to Configure Auto-scaling for AWS ECS Service with Custom Capacity Provider | by Sahil Chawla | AWS in Plain English

Amazon Elastic Container Service (Amazon ECS) is a fast container orchestration service to quickly run, stop, and manage launch thousands of containers on a cluster ECS is also a highly scalable service, meaning you can easily and automatically scale container clusters to match application requirements.

So what is Cluster Auto Scaling in Amazon ECS?

Let’s take a look.

What is Amazon ECS Cluster Auto Scaling?

Amazon ECS Cluster Auto Scaling (CAS) makes it easy to scale in or out your Amazon EC2 instances in an ECS cluster to accommodate your tasks and services. CAS means that Amazon ECS can manage the scaling of all EC2 instances registered to your cluster by using an Amazon ECS Auto Scaling Group (ASG) capacity provider with managed scaling turned on.

Doing this creates two custom CloudWatch metrics (more on this later) plus a target tracking scaling policy. The policy attaches to your ASG, which allows ECS to manage the group’s scale-in and scale-out actions based on the load tasks put on your cluster. CAS ensures that the correct number of instances are running in an ASG to satisfy the needs of the tasks assigned to that ASG.

How does ECS CAS Work?

For each ASG provider, ECS will create and manage a low metric value and high metric value CloudWatch alarm and a target tracking scaling policy. The process to enable Amazon ECS cluster auto scaling is as follows:

  • Create an ASG
  • Create a capacity provider (that uses that group)
  • Turn on managed scaling for the provider
  • Associate the capacity provider with a cluster

ECS will regularly collect information to determine whether the ASG needs to scale (in or out). The group will launch new instances to scale out if launched tasks cannot be placed on available instances, and scale in by terminating a running instance on which there are no tasks.

Amazon ECS Auto Scaling with CloudWatch Metrics

Amazon ECS measures service utilization based on average CPU and memory utilization and publishes them as predefined CloudWatch metrics to help you:

  • Scale out your service, i.e., add more tasks, to satisfy high demand at peak times
  • Scale in your service, i.e. run fewer tasks, to reduce costs during low resource utilization

You can also track and measure many custom metrics to trigger specific application scaling actions (based on alarms from CloudWatch), such as:

  • Average response time
  • New requests rate
  • SQS queue buffer depth

With the help of these metrics, you can provision the right amount of capacity required by the application and maintain a balance between app performance and cost.

Conclusion

Amazon ECS is a great choice to quickly and easily run reliable and scalable containers in the AWS Cloud. To know more about ECS and its auto scaling capabilities, contact Axcess.io.

  • Alice Leroy

    Agatha Correia Pinto, a social media strategist, shares actionable tips and strategies for successful social media marketing.

    Related Posts

    Protect and Grow Your Capital with Advanced Forex Risk Management Tools

      In the fast-paced and dynamic world of Forex trading, managing risk is one of the most important factors for long-term success. While the allure of high profits is a…

      Why Healthspring Medicare Advantage is the Highest Rated Option for Seniors

    Healthspring Medicare Advantage continues to receive Healthspring Medicare Advantage reviews, and for good reason. From extensive coverage to cost-effective pricing, Healthspring has established itself as one of the most trusted…

    You Missed

    Protect and Grow Your Capital with Advanced Forex Risk Management Tools

      Why Healthspring Medicare Advantage is the Highest Rated Option for Seniors

    Andrew Hillman Helping Companies Strengthen Long-Term Profitability

    YOONIT MAM/PAMM: Data-Driven Multi-Account Management Trends and Insights for Modern Trading Platforms

    YOONIT MAM/PAMM: Data-Driven Multi-Account Management Trends and Insights for Modern Trading Platforms

    The Biggest Bitcoin Holders in History: Who Owns the Most Bitcoin

    The Biggest Bitcoin Holders in History: Who Owns the Most Bitcoin

    Live Poker Cash Games in Cork – Discover High-Stakes Poker Action and Thrilling Gameplay

    Live Poker Cash Games in Cork – Discover High-Stakes Poker Action and Thrilling Gameplay