What's the target group port for, when using Application Load Balancer + EC2 Container Service

后端 未结 4 1578
你的背包
你的背包 2021-02-01 15:02

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

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-01 15:39

    I ran into this situation myself at work. I noticed the target group port and the port of the registered instance were different. I've typically set them up to be the same thing so wondered what this was all about which led me to this thread. I couldn't find a good answer on AWS docs, but found this in the Terraform docs for aws_lb_target_group resource:

    port - (Optional, Forces new resource) The port on which targets receive traffic, unless overridden when registering a specific target.

    So, I guess it's just the default port used unless you override it. Makes sense.

提交回复
热议问题