Currently, it's not possible for one CLB to load balance two distinct TCP services running in the same multinode ECS cluster (confirmed by AWS support).
Context: Suppose i have a custom TCP server. I would like to run this server for each customer, a single container instance per customer and have those services exposed to the outside world. Ideally ECS, for each service, would add a TCP listener in CLB that routes traffic to a specific EC2:port instace (the port pair does not matter, the important part is for it to be reachable from the outside).
Thank you
For TCP communication between services running on dynamic ports most AWS customers use thick client load balancing with a solution like linkerd, consul, or weaveworks (which provides an overlay network). You can also use DNS based service discovery.
There is a list of service discovery mechanisms that integrate well with Amazon ECS here: https://github.com/nathanpeck/awesome-ecs#service-discovery
You'll be happy to know that a new type of load balancer was just released called Network Load Balancer (NLB). This should solve your problem!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.