Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Fargate Cluster Scaling

It's unclear to me exactly how the underlying AWS Fargate cluster works under the covers.

Does the underlying cluster still scale up and down as needed when the tasks need more instances, and if so, where is that specified?

like image 288
Steve Avatar asked Dec 04 '17 17:12

Steve


People also ask

Is AWS fargate scalable?

AWS Fargate, the serverless compute engine for Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS), now enables customers to scale applications faster, improving performance and reducing wait time.

Does fargate need Autoscaling?

Autoscaling is very important to making sure that your services stay online when traffic increases unexpectedly. In both EC2 and AWS Fargate one way to ensure your service autoscales is to increase and decrease the number of copies of your application container that are running in the cluster.

Can fargate scale to zero?

Scaling to zero means you have to boot your container / OS / application, which means any request could time out before it's serviced.


1 Answers

Yes, Application Autoscaling works fine with Fargate.

Using CloudFormation:

  • create an AWS::ApplicationAutoScaling::ScalableTarget and specify for RescoureId your service/<cluster-name>/<service-name>
  • create your AWS::ApplicationAutoScaling::ScalingPolicy and specify only the ScalingTargetId (do not declare ScalableDimension, ServiceNamespace and RescoureId)

Add it will scale in/out your ECS service

like image 181
Tommaso Avatar answered Nov 14 '22 21:11

Tommaso