本文介绍了使用 Application Load Balancer + EC2 Container Service 时的目标组端口是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个侦听端口 443 的 ALB,将负载均衡到随机端口上的 ECS Docker 容器,假设我有 2 个具有相同任务定义的容器实例,侦听端口 30000 和 30001.

I'm trying to setup an ALB which listens on port 443, load balancing to ECS Docker containers on random ports, lets say I have 2 container instances of the same task definition, listening on port 30000 and 30001.

当我尝试在 AWS EC2 管理控制台中创建目标组时,有一个范围为 1-65535 的端口"输入字段.我应该在那里放什么号码?

When I try to create a target group in the AWS EC2 Management console, there's a "port" input field with 1-65535 range.What number should I put there?

当我尝试在 AWS EC2 Container Service 控制台中创建新服务以及连接到现有 ALB 的新目标组时,目标组端口"没有输入字段.创建后,导航到 EC2 控制台,新目标组的端口为80".我必须监听 80 端口吗?但是健康检查是针对流量端口",也就是集装箱端口,30000和30001,那有什么意义?

And when I try to create a new service in the AWS EC2 Container Service console, together with a new target group to connect to a existing ALB, there's no input field for a target group "port".After it's created, navigating to the EC2 console, the new target group has port "80".Do I have to listen on port 80?But the health check happens against the "traffic port", which is the container port, 30000 and 30001, so what's the point?

推荐答案

事实证明,当与 ECS 结合使用时,目标组的端口没有任何意义.你不需要监听那个端口.

Turns out, when combined with ECS, the target group's port doesn't mean anything. You don't need to listen on that port.

这篇关于使用 Application Load Balancer + EC2 Container Service 时的目标组端口是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 03:04