即使我得到了CloudWatch缩容警报,ECS自动缩容仍无法正常工作。

0

【以下的问题经过翻译处理】 环境

  • ECS和Fargate
  • 扩展策略 Enter image description here

我收到了类似于缩小规模的警报,如下所示: Enter image description here

但是,自18:43以来,ECS没有进行缩小规模处理。 Enter image description here

Enter image description here

我没有使用缩小规模保护选项。

如果您遇到类似的问题,请告知原因。

profile picture
EXPERT
asked 5 months ago42 views
1 Answer
0

【以下的回答经过翻译处理】 你好,

通常情况下,当警报触发时,AutoScaling可能选择不进行缩小操作,原因可能有很多(已经达到最小值、暂停进程、正在进行活动等等)。而特定的Target Tracking具有多个额外的检查层(例如,如果存在多个目标跟踪策略,则它们都需要同时希望进行缩小)。所有这些都是为了防止过度的振荡并在环境中保持高可用性。

最近推出了一项Application AutoScaling功能,以帮助增加这些不进行缩放决策的透明度。您可以从AWS CLI中运行下面的命令(填写需要的特定信息),并让我知道它是否有信息可以阐明延迟缩放的情况。

aws application-autoscaling describe-scaling-activities \
    --include-not-scaled-activities \
    --service-namespace ecs \
    --scalable-dimension ecs:service:DesiredCount \
    --resource-id service/default/web-app

如果在CLI中看到错误,指出“--include-not-scaled-activities”不是一个有效的标志,则需要更新CLI(因为这是一个相对较新的功能)。或者,您可以使用AWS Console中的CloudShell,它应该具有最新的CLI版本。

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions