Does AWS ECS support the dynamic scalability of each container?

Amazon EC2 Container Service allows you to launch any number of containers you want, it will select an EC2 instance to start containers automatically. These are great features. However, we are really concerned about auto-scalability .

Scenario:

  • I run the container through the AWS ECS console.
  • HTTP requests are starting to appear.
  • HTTP downloads increase significantly over time.
  • Using the CPU (or RAM) of the container is approaching 100%.

Question 1: Will ECS launch another container automatically ?

Question 2: Will ECS automatically close one of the containers when the load on the processor (or RAM) is low?

+2
source share
4 answers

No, you do not get fully automatic scaling with the main ECS. What you can do is create an alarm when the load is high and the alarm activates the update to increase the cluster size.

November 29, 2017 Patch

AWS Fargate is a technology for Amazon ECS and EKS * that allows you to run containers without the need for server or cluster management. With AWS Fargat, you no longer need to provide, configure, and scale virtual machine clusters to run containers.

This allows you to scale containers without worrying about infrastructure working with ECS service level scaling configurations.

+2
source

Ideally, you should scale both at the ec2 level and at the ecscontainer.

If you use ASG, on ASG you can configure the ec2 setting based on cloud alarms.

To scale the container, you will need to write a lambda function or have some kind of application that can be run in the cloudwatch signal to scale.


On May 18, 2016, ECS released autoscaling. you don’t need Lambda to create service-level scalability.

See release documentation and features below.

https://aws.amazon.com/about-aws/whats-new/2016/05/amazon-ec2-container-service-supports-automatic-service-scaling/

http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html

+1
source

Therefore, he does not say this explicitly, and Nathaniel may certainly be right, but this blog from April 9 this year, apparently, implies at least that you can do what you ask

Long-Term Applications Previously, Amazon ECS included two methods: schedule docker containers on the cluster. You can run tasks once for processes such as batch jobs that perform work and then stop. You can also access the Amazon ECS APIs to retrieve the state of cluster information, and then use it to connect a third-party or personalized scheduler.

With today's launch, you can also use the new Amazon ECS Scheduler service to manage long-term applications and services. A service scheduler helps maintain application availability and allows you to scale your containers up or down to suit your needs. application capacity requirements. Here is what he does for you:

Load Balancing - The Service Planner allows you to distribute traffic through your containers using elastic load balancing. Amazon ECS automatically registers and unregisters your containers from the appropriate load balancer. Healthcare management - the service scheduler also automatically restores containers that become (do not check ELB functionality) or stop working to make sure that you have the required number of healthy containers available to run your application. Scaling and scaling - you can scale applications up and down by changing the number of required service containers to run. Update management. You can update your application by changing its definition or using a new image. the scheduler automatically launches new containers using the new one using the previous version. This will wait until the ELB connections are merged if an ELB is used. You can also use these new features to implement the basic service discovery model. You can display services running in a cluster and then use ELB as a service endpoint.

0
source

As of December 2017, Amazon has announced the new Fargate service. Quoting the link:

AWS Fargate makes it easy to scale your applications. You no longer need to worry about providing sufficient computing resources for your container applications. After determining the requirements for your application (for example, CPU, memory, etc.) AWS Fargate manages all the scalability and infrastructure necessary to quickly launch your containers. You no longer need to decide when to scale your clusters or pack them for optimal use .

I assume bold text means that Fargate will scale up and down resources for me. Not 100% sure.

0
source

Source: https://habr.com/ru/post/1239889/


All Articles