简体   繁体   English

如何使用亚马逊 ecs 运行 15 个 docker 容器

[英]How to run around 15 docker containers with amazon ecs

My dockerized application has 12 services in docker-compose.yml, now I want to deploy this application on AWS ECS so any idea how to do that?我的 dockerized 应用程序在 docker-compose.yml 中有 12 个服务,现在我想在 AWS ECS 上部署这个应用程序,所以知道该怎么做吗?

In task definition, we can add only up to 10 containers, also is there a way to add multiple task definitions in services?在任务定义中,我们最多只能添加10个容器,还有没有办法在服务中添加多个任务定义?

You should not put all the service in a single task definition, better to run each task in a separate service and for service to service communications use service discovery or internal load balancer .您不应该将所有服务放在单个任务定义中,最好在单独的服务中运行每个任务,并且服务到服务的通信使用 服务发现内部负载平衡器

In task definition, we can add only up to 10 containers, also is there a way to add multiple task definitions in services在任务定义中,我们最多只能添加10个容器,还有没有办法在服务中添加多个任务定义

Beside 10 containers limit, there are many other issues with this approach除了 10 个容器的限制之外,这种方法还有许多其他问题

  • You can not scale one container , for example scaling PHP container will scale Nginx as well不能缩放一个容器,例如缩放 PHP 容器也将缩放 Nginx
  • Hard to maintain replica and essential container for the service难以维护服务的副本和基本容器
  • Not a production grade approach as it uses linking for service to service communication不是生产级方法,因为它使用链接进行服务到服务的通信
  • Fewer resources utilization更少的资源利用率

Or if you need a quick fix then break the task definition into a dependency group, create two task definition for depended containers so they will able to communicate with each other being part of the same task definition.或者,如果您需要快速修复,然后将任务定义分解为依赖组,为依赖的容器创建两个任务定义,以便它们能够作为同一任务定义的一部分相互通信

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Fargate 上的 Amazon ECS 中以非 root 用户身份运行 docker 容器 - How to run docker containers as a non-root user in Amazon ECS on Fargate 在Amazon ECS上运行Docker映像 - Run docker image on amazon ecs 使用Amazon ECS运行Docker Network - Run Docker Network using Amazon ECS Amazon 内部 DNS 在 ECS 内部不工作 Docker 容器 - Amazon Internal DNS Not Working Inside ECS Docker Containers 如何使用 Amazon ECS 运行 docker 任务 - 出现错误“已停止(CannotStartContainerError:来自 dae 的错误响应)” - How to run docker task with Amazon ECS - getting error `STOPPED (CannotStartContainerError: Error response from dae)` 在Amazon ECS上在Docker中运行Node API的最佳方式是什么? - What is the optimal way to run a Node API in Docker on Amazon ECS? 我可以安排Docker在特定时间在Amazon ECS上运行吗? - Can I schedule Docker to run on specific time on Amazon ECS? 如何以编程方式扩展 AWS ECS 上托管的 Docker 容器? - How to scale Docker containers hosted on AWS ECS programmatically? 我应该使用 AWS Elastic Beanstalk 还是 Amazon EC2 Container Service (ECS) 来扩展 Docker 容器? - Should I use AWS Elastic Beanstalk or the Amazon EC2 Container Service (ECS) to scale Docker containers? 如何自动用更新的Docker映像替换在Amazon ECS中运行的映像 - How to replace the image running in Amazon ECS with a newer docker image automatically
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM