不使用时,将EC配置为缩放为零
我正在使用Fargate在AWS EC中运行超集。超集的这个实例仅用于内部用途。我希望能够在不使用时配置ECS以扩展到零任务。我知道,恢复需要花费时间(可能是几分钟),此应用程序的最终用户满足于等待几分钟。
情况:
- AWS ECS使用Fargate Autoscaling设置部署
- 到最大2,而0分钟为0
- ,在不使用时要扩展到0(例如,一个小时)
I'm running Superset in AWS ECS using Fargate. This instance of Superset is for internal use only. I want to be able to configure ECS to scale to zero tasks when not in use. I am aware that it will take time (Possibly minutes) to come back up, the end-users of this application are content with waiting a few minutes.
Situation:
- AWS ECS deployed using Fargate
- Autoscaling set to a max of 2 and a min of 0
- Want to scale to 0 when not in use (after, say, an hour)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可能在不使用时将EC降低到零。 ECS的设计目的是连续运行,与随着请求到达时可以打开和关闭的Lambda功能不同。
但是,如果您的内部用户仅在已知时间(例如工作时间)访问该应用程序,则可以在特定时间内使用计划的缩放比例缩放为零。
您可以使用为此。
这篇AWS博客文章更详细地解释: https://aws.amazon.com/blogs/containers/optimizing-amazon-elastic-container-service-for-cost-cost-cost-cost-using-scheduled-scaling/
Scaling ECS down to zero when not in use is not possible. ECS is designed to run continuously, unlike Lambda functions that can be turned on and off as requests arrive.
However, if your internal users only access the application during known hours (say business hours), then you can use scheduled scaling to scale to zero during specific hours.
You can use put-scheduled-action for that.
This AWS Blog post explains it in more detail: https://aws.amazon.com/blogs/containers/optimizing-amazon-elastic-container-service-for-cost-using-scheduled-scaling/