Several Amazon ECS tasks on the same instance host -


say have autoscaling group initial number of 2 instances. assume instances of autoscaling group of same type (hence same amount of memory , cpu). maximum number of instances isn't relevant in case. have elb load-balancing load among instances of group. besides this, instances of autoscaling group members of fresh ecs cluster i've created earlier. there 1 task definition in case 1 container use 512mb of ram. container requires port mapping host's 80 container's 5000.

say i've spun autoscaling group , 2 initial instances ready used. i'm trying spawn service of 4 tasks based on aforementioned task definition. imagine tasks fit 2 instances if placed 2 (if hosts had 1gb of ram each).

would setup legitimate? if happen port mappings because there 2 identical containers on 1 host?

you forward 5000 different instance ports (since can't bind 80 multiple times).

you use elb map across ports. this post answers specifics.

you'd want standardize ports of service 1 across cluster bind elb it. ie. elb port 80 can't mapped 5000 , 5001. port 5000 forwarded on both instances.

enter image description here


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -