Reputation: 561
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
Upvotes: 1
Views: 901
Reputation: 5521
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!
Upvotes: 1
Reputation: 5521
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
Upvotes: 1