The given problem:

  • Created a Java Tcp Server with Eclipse vertx(Toolkit for building reactive,event driven)applications on JVM. The applicatino has two Tcp Servers which are running on port numbers: server1(port:5050);server2(5051)

  • I created a Docker image and was running the application inside a container and all works fine locally.

  • I want to deploy the docker container on ECS(Amazon Container Service) and to use Network Load balancer,the question is how can i assign different ports to different containers if in the Java code i was setting up explicity

//tcp server 1 listens on port 5050

  • and how does ECS manages what ports to assign to what container?

    The tcp client is always targeting one ip adress and one port number it cannot be changed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.