Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service only supports one exposed port #184

Closed
lukehoban opened this issue Nov 3, 2017 · 4 comments
Closed

Service only supports one exposed port #184

lukehoban opened this issue Nov 3, 2017 · 4 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec
Milestone

Comments

@lukehoban
Copy link
Member

lukehoban commented Nov 3, 2017

Trying to create a single service with multiple ports exposed - such as:

let jaeger = new cloud.Service("jaeger", {
    containers: {
        nginx: {
            image: "jaegertracing/all-in-one:latest",
            memory: 1000,
            environment: { COLLECTOR_ZIPKIN_HTTP_PORT: "9411" },
            ports: [{ port: 16686 }, {port: 5778}, {port: 9411}],
        },
    },
});

Leads to:

error PU2012: aws:ecs/service:Service resource 'jaeger' has a problem: load_balancer: attribute supports 1 item maximum, config has 3 declared

This is due to http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html:

There is a limit of one load balancer or target group per service.

That is a significant limitation that I was not previously aware of. It's not yet clear how we will work around this.

@lukehoban
Copy link
Member Author

lukehoban commented Nov 3, 2017

Aside: We could also identify and report a better error here assuming we don't have a forthcoming fix for this.

@lukehoban
Copy link
Member Author

Kubernetes addresses this by separating the notion of Service and Deployment.

A Kubernetes Service handles the load-balancing and network addressability of a service.

A Kubernetes Deployment handles the managed deployment of a pod (collection of containers) at a specified number of replicas.

Unfortunately, ECS doesn't have such a split - the ECS Service is both of these, and there doesn't appear to be any way to decouple these.

@joeduffy joeduffy added this to the 0.9 milestone Nov 3, 2017
@joeduffy
Copy link
Member

joeduffy commented Nov 5, 2017

I think ECS supports this for classic LBs with multiple listeners. I have to admit, I don't know specifically what that would lose us as this point, and whether that loss would be prohibitive.

@joeduffy joeduffy modified the milestones: 0.9, 0.10 Nov 13, 2017
@lukehoban lukehoban added the kind/bug Some behavior is incorrect or out of spec label Jan 15, 2018
@lukehoban lukehoban modified the milestones: 0.10, 0.11 Jan 15, 2018
@lukehoban lukehoban modified the milestones: 0.11, 0.12 Feb 8, 2018
@lukehoban lukehoban modified the milestones: 0.12, 0.15 Mar 15, 2018
@lukehoban lukehoban modified the milestones: 0.15, 0.16 May 19, 2018
@lukehoban
Copy link
Member Author

#441 will help here by not requiring all visible ports to be publicaly exposed via a Load Balancer.

Beyond that, there's not much we're likely to do here until/unless AWS ECS makes changes. Closing out, and we'll reopen if we here more reports of issues here after addressing #441.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants