[英]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.