本文介绍了使用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