Accelerating Scaling for Amazon ECS Cluster Auto Scaling to improve cost optimization

0

We've implemented an Elastic Container Service (ECS) configuration that leverages a capacity provider in conjunction with an Auto Scaling Group. In addition, we've employed scheduled task scaling to accommodate specific traffic spikes.

For instance, when we increase the task count from 1 to 5, ECS dynamically generates new EC2 instances via the Auto Scaling Group.

Conversely, when we reduce the task count from 5 to 1, ECS also adjusts the corresponding EC2 instance count in the Auto Scaling Group. However, it's worth noting that there's a delay in initiating the scale-in action, as the Cloud Auto Scaling (CAS) system necessitates an initial 15-minute interval.

Our goal is to** accelerate the scale-in action** process to improve cost optimization.

If anyone has experience with this or any insights, your input would be greatly appreciated.

2回答
0

Hi,

To accelerate scale-in and optimize costs, you have to adapt the value of so-called "cooldown" period. It is by default set to 300s (5 mins)

For details, see https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scaling-cooldowns.html

After your Auto Scaling group launches or terminates instances, it waits for a cooldown period 
to end before any further scaling activities initiated by simple scaling policies can start. The 
intention of the cooldown period is to prevent your Auto Scaling group from launching or terminating additional instances before the effects of previous activities are visible.

The section "Considerations" will give you all perspectives to best choose the value: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scaling-cooldowns.html#cooldown-considerations

Best,

Didier

profile pictureAWS
エキスパート
回答済み 9ヶ月前
  • Cooldown is for Simple Scaling, and it sounds like Target Tracking is being used here

0

There isn't quite enough info here to give an answer.

  1. You mentioned a 15 minute scale-in time, does that mean you're using a Target Tracking scaling policy? I'm assuming yes since that's usually the low alarm times set on target tracking currently.
  2. Is CAS in this context an internal script/application your team uses? Or are you using this to refer to autoscaling in general?
  3. Are you using capacity providers in ECS with managed scaling?

You can't adjust the scale-in times of target tracking alarms, since its a managed scaling policy. If you're using a capacity provider, then it always uses Target Tracking, but if you're managing your own scaling policies, then you can use step scaling with your own custom alarms.

If you're using scheduled scaling on the Service (in Application AUtoScaling), then you could also setup a scheduled scaling policy on the ASG to scale-in at the same time

AWS
エキスパート
回答済み 9ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ