docker - 亚马逊弹性容器服务-与ECS等效的Kubernetes事件/就绪检查

标签 docker asp.net-core amazon-ecs application-warmup

我的任务是预热在ECS上部署的Docker容器中运行的ASP.Net Core应用。似乎使用Kubernetes,我们可以定义一个就绪检查路径,Kubernetes将首先向其发送请求,并且仅在该请求完成后才开始发送实际流量。

ECS是否具有等效功能?

关于此问题的引用,但可以在Kubernetes中解决:
https://blog.markvincze.com/running-asp-net-core-in-auto-scaling-containers-warm-up/

最佳答案

从今年开始,ECS确实使用了Docker HEALTHCHECK。

从3月8日的公告(https://aws.amazon.com/about-aws/whats-new/2018/03/amazon-ecs-supports-container-health-checks-and-task-health-mana/):

Amazon ECS integrates with Docker container health checks to allow you to explicitly define and monitor the health of each container. Using the HEALTHCHECK command, you can define which parameters to monitor for each container in your Task Definition. Running tasks (groups of running containers) are now assigned a health status based on the health of their essential containers, and the task's health status is integrated with the ECS service scheduler to automatically redeploy unhealthy tasks and conduct rolling-updates of services. You can check the health status of your tasks and containers in the ECS Console or with the ECS DescribeTasks API.



如果ECS确定您的任务不正常,它将为您替换任务。如果您碰巧同时也在使用AWS LB,则可以将LB配置为也进行运行状况检查,以确保将流量路由到运行状况良好的节点。 ECS不像kubernetes那样区分活跃性和就绪性。它仅具有“健康”检查概念。

关于docker - 亚马逊弹性容器服务-与ECS等效的Kubernetes事件/就绪检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50692536/

相关文章:

node.js - 如何在 Docker 容器中运行数据库服务?

amazon-web-services - AWS EC2实例上的docker微服务上的kubernetes

javascript - 如何在 React with Redux 项目中将 props 数据转换为数组?

c# - Entity Framework 核心计算属性多个表

amazon-web-services - 使用 Github 操作在 AWS ECS 上使用 Docker Compose 进行部署

amazon-web-services - AWS云信息: is supporting multiple LogDrivers possible in ContainerDefinitions

amazon-web-services - 如何为ecs任务添加预热时间?

python - 如何通过包含特定 python 版本的 docker 从 linux 运行 python 代码

python - Django 系统检查、迁移和测试在本地通过,但在 Docker CI/CD 环境中失败

asp.net-core - 如何用我自己的 IoC 替换内置 IoC?