BT

Amazon Brings Auto Scaling to EC2 Container Service

| by Kent Weare Follow 10 Followers on Jun 06, 2016. Estimated reading time: 2 minutes |

Amazon recently announced it is bringing automatic scaling to its Amazon ECS service. This allows Amazon ECS services to scale out, or scale in, automatically. Scale events are the result of Amazon CloudWatch alarms being triggered when threshold-based metrics exceed, or fall below, expected values.

Amazon ECS, also known as EC2 Container Service, is a management service that supports Docker containers on Amazon EC2 clusters. Amazon already supports auto scaling for EC2 clusters, but auto scaling container services, that run on EC2 clusters, was previously not supported.

Amazon Cloud Watch metrics drive the behavior of auto scaling events.  Amazon Cloud Watch metrics include CPU utilization, data transfer or disk usage. Developers also have the ability to publish their own custom metrics to CloudWatch through a put-metric-data AWS Command or PutMetricData Query API.

An example of when you may use auto scaling includes a web service that has been deployed and is experiencing CPU pressure.  In this scenario, you want to scale those container(s) out.  Once, CPU pressure has returned to normal alerts, developers can configure scale in events to reduce the number of containers, and subsequently compute costs.

The following image illustrates how both scale in and scale out events are configured at both container and cluster tiers using the AWS Management Console. In both scenarios, scale events are triggered through CPU utilization levels.

Image Source: https://aws.amazon.com/blogs/compute/automatic-scaling-with-amazon-ecs/

Using Multi-AZ (Availability Zone) EC2 clusters and Elastic Load Balancers, customers can scale both EC2 clusters and EC2 Container Services across Availability Zones to provide additional fault tolerance. Mayank Thakkar, enterprise solutions architect at Amazon Web Services, explains the process in setting auto scaling up: “The process to create services that scale automatically is supported by the ECS console, CLI, and SDK. You choose the desired, minimum and maximum number of tasks, create one or more scaling policies, and Service Auto Scaling handles the rest. The service scheduler is also Availability Zone–aware, so you don’t have to worry about distributing your ECS tasks across multiple zones.”

Thakkar cautions that scaling EC2 clusters may take longer than containers, but suggests the following strategy to mitigate delays: “You may set the cluster scaling policies in such a way so that you can have some additional cluster capacity in reserve. This will help your ECS service scale up faster, but at the same time, depending on your demand, keep some EC2 instances underutilized.”

Amazon is not the only public cloud vendor to provide auto scaling of their container service.  Microsoft Azure also provides this functionality in the form of Azure Virtual Machine Scale Sets (VMSS).  Microsoft depends upon Azure Insights Autoscale to provide auto scale functionality without pre-provisioning VMs.  Azure VMSS can not only be used with containers, but also with big compute and big data workloads. Azure VMSS is typically deployed using ARM templates, but can also be created using REST API, Powershell or Azure CLI.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Autoscaling issues by Azaz Qadir

Auto scaling is helpful, but configuring this service manually is a lot complicated. It is better to use a managed hosting platform for this reason. It's not just scaling, but installing application on EC2 server is complicated as well. It can take a lot of time and efforts to do that. Managed hosting platform, like Cloudways, is a better option, because they provide one click installation feature that saves lot of time and efforts.

Re: Autoscaling issues by Kent Weare

Thank you for adding your perspective Azaz.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT