While creating the target tracking policy, Application Auto Scaling creates CloudWatch alarms for scaling in and scaling out according to the target value. policy-name Test-Step-scaling-policy-ScaleOut -policy-type StepScaling \ For example:Īws application-autoscaling put-scaling-policy \ At first, create a step scaling policy.Then for the scalable target, create a target tracking or step scaling policy: min-capacity 1 -max-capacity 10 -region us-west-1Ģ. resource-id service/your-cluster/your-service-name \ service-namespace ecs -scalable-dimension ecs:service:DesiredCount \ Firstly, we need to register the Fargate service as a scalable target with Application Auto Scaling:Īws application-autoscaling register-scalable-target \.Now let’s see the steps to configure service Auto Scaling using the AWS CLI: Also, we must select a scale-out and scale-in cooldown period.Ĭonfiguration of Service Auto Scaling using the AWS CLI.For target tracking, we can use the ECSServiceAverageCPUUtilization, ECSServiceAverageMemoryUtilization, and ALBRequestCountPerTarget Amazon ECS service metrics.Auto Scaling creates and manages the CloudWatch alarms that trigger the scaling policy and calculates the scaling adjustment according to the metric and the target value. We need to set a target value for the specified selected scaling metric.To handle scale-in and scale-out activity, we can increase or decrease the desired task count by creating scaling policies.Also, we have to specify the scaling adjustment type as a percentage of the current capacity of the scalable target.We must select scaling actions or step adjustments, like ScalingAdjustment and MetricIntervalUpperBound.We can create or use existing CloudWatch alarms for any metric for step scaling.Based on our requirements we can select any of the policies.įor step scaling policies, we create and manage the CloudWatch alarms that trigger the scaling process. There are two scaling policies and they are target tracking policy and step scaling policy. Select Auto Scaling Policy in the Automatic task scaling policies section and then proceed with the remaining steps for creating or updating the service. If this role is not available then select Create new role.Ħ. Then select ecsAutoscaleRole for the option IAM role for Service Auto Scaling. Also enter the highest number of tasks that we wish the Service Auto Scaling to use for the option Maximum number of tasks.ĥ. Enter the number of tasks that we wish the Service Auto Scaling to use for the option Desired number of tasks.Ĥ. Then enter the lowest number of tasks that we wish the Service Auto Scaling to use for the option Minimum number of tasks.ģ. Select Configure Service Auto Scaling to adjust your service’s desired count.Ģ.While creating or updating service in the Amazon ECS console, select the following from the Set Auto Scaling page. Now let’s see the steps to configure Amazon ECS Service Auto Scaling on Fargate: Until the desired count and the running count becomes the same, the scaling activity remains in the InProgress state.Ĭonfigure Amazon ECS Service Auto Scaling on Fargate The ECS service scheduler launches or shuts down tasks to meet the new desired count. Then, Application Auto Scaling makes the UpdateService API call to Amazon ECS with the new desired count value. If the CloudWatch alarms trigger an Auto Scaling policy, then according to the scaling policy the Application Auto Scaling sets the new desired count. Further, we can use CloudWatch metrics to configure the CloudWatch alarms. It is the ability to increase or decrease the desired count of tasks in our ECS service automatically. The Service auto-scaling is a combination of the Amazon ECS, CloudWatch, and Application Auto Scaling. Today, let’s see the steps followed by our Support Techs to help our customers to configure Amazon ECS Service Auto Scaling on Fargate. Looking for how to configure Amazon ECS Service Auto Scaling on Fargate? We can help you with this!Īs a part of our AWS Support Services, we often receive similar requests from our AWS customers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |