简体   繁体   English

如何使用一个实例和一个负载均衡器部署多个 ECS 服务?

[英]How to deploy many ECS services using one instance and one load balancer?

I'm new to AWS and I am trying to gauge what migrating our existing applications into AWS would look like.我是 AWS 的新手,我正在尝试评估将我们现有的应用程序迁移到 AWS 会是什么样子。 I'm trying to host multiple apps as Services under a single ECS cluster, and use one Application Load Balancer with hostname rules to route requests to the correct container.我正在尝试在单个 ECS 集群下将多个应用程序作为服务托管,并使用一个具有主机名规则的应用程序负载均衡器将请求路由到正确的容器。

I was originally thinking I could give each service its own Target Group, but I ran into the RESOURCE:ENI error, which from what I can tell means that I can't just attach as many Target Groups as I want to the same cluster.我最初以为我可以为每个服务提供自己的目标组,但我遇到了RESOURCE:ENI错误,据我所知,这意味着我不能将尽可能多的目标组附加到同一个集群。

I don't want to create a separate cluster for each app, or use separate load balancers for them because these apps are very small and receive little to no traffic so it just wouldn't make sense.我不想为每个应用程序创建一个单独的集群,或者为它们使用单独的负载均衡器,因为这些应用程序非常小并且几乎没有流量,所以这没有意义。 Even the minimum of 0.25 vCPU/0.5 GB that Fargate has is overkill for these apps.即使是 Fargate 拥有的最低 0.25 vCPU/0.5 GB 对于这些应用程序来说也是多余的。

What's the best way to host many apps under one ECS cluster and one Load Balancer?在一个 ECS 集群和一个负载均衡器下托管多个应用程序的最佳方式是什么? Is it best to create my own reverse-proxy server to do the routing to different apps?最好创建我自己的反向代理服务器来路由到不同的应用程序吗?

You are likely using awsvpc network mode for the task definitions.您可能使用awsvpc 网络模式来定义任务。 You could change it to the (default) bridge mode instead.您可以改为将其更改为(默认) bridge模式。 Your services don't seem to be ones that would need the added.network performance boost of using the native EC2.networking stack.您的服务似乎不需要使用本机 EC2.networking 堆栈来提高网络性能。

The target groups' target types should be instance as per my understanding.根据我的理解,目标组的目标类型应该是instance

暂无
暂无

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

相关问题 如何在没有负载均衡器的情况下访问 ECS 服务? - How to reach an ECS Service without a load balancer? ECS 实例无法连接到自身 behind.network 负载均衡器 - ECS instance can't connect to itself behind network load balancer 如何在 Kubernetes 中使用负载均衡器服务公开多个端口 - How to expose multiple port using a load balancer services in Kubernetes 如何使用 mysql workbench 连接到私有 rds in.network 负载均衡器和 ecs - How to connect to private rds in network load balancer and ecs with mysql workbench AWS ECS 仅限于一个容器实例 - AWS ECS restrict to only one container instance AWS Application Load Balancer 未加载指向同一 EC2 实例的目标组之一 - AWS Application Load Balancer not loading one of the target groups pointing to same EC2 instance 如何保证一个AWS ECS定时任务在同一时间只运行一个实例? - How to ensure only one instance of an AWS ECS scheduled task run at the same time? 私有 su.net 中带有 ECS Fargate 的应用程序负载均衡器 - Application Load Balancer with ECS Fargate in private subnet Google 云存储 - static 内容(使用多个带负载均衡器的桶对性能的影响)(初学者问题) - Google cloud storage - static contents ( the effect of using more than one bucket with load balancer on performance) (beginner question) HAproxy vs ALB 或任何其他负载均衡器使用哪一个? - HAproxy vs ALB or any other load balancer which one to use?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM