Hacker News new | ask | show | jobs
by zenocon 3909 days ago
I just setup something similar for one of our api services as a trial to see how it would work out. My biggest gripe with ECS is that it currently does not support dynamic port mapping between ELB and a container instance. For example, if your service listens on port 8080, and ELB terminates port 443 and forwards to a container, then you can only have one container instance per EC2 cluster node, b/c spinning up two containers on the same node results in a port resource conflict.

This makes the whole solution fairly similar to just using auto-scale to spin up a new EC2 instance per app.

I know this is a major gripe right now with ECS, and hopefully Amazon is working on a solution.

Other than a few other frustrating gotchas, ECS has been pretty nice. I do like the idea of putting central config in S3 and copying config files over to cluster instances with a user data script (how they recommend you pull from private docker repo).

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/...

2 comments

you can get around the 1:1 ratio of docker container to host by introducing service discovery. We are using ECS + docker with consul as our service discovery solution. We have an edge gateway using Zuul, with our routing filters hitting consul to get a service endpoint and port. Then forwarding the request to that service. It has been nice sofar and allows us to run multiple containers (same service or different service) on a host.
An option here is to run a local proxy on the node that knows how to forward requests to various container ports on the same node.