简体   繁体   中英

AWS ECS Fargate port Mapping

I have ECS cluster.In that there are two task definitions and each task definition have only one container.We are using ECS fargate model here with networking type as awsvpc.

Task Definition 1: Query-Conatiner Task Definition 2: Send-Conatiner

Now there are 2 services for each of the two task definitions above.

Query-Conatiner and Send-Conatiners both are mapped to port 8080 of host.

Wont there be any conflict as both ports are mapped to 8080?

When using awsvpc, each container gets assigned a different Elastic Network Interfaces (ENI), so each container will have a different IP, hence, no port conflict (eg Query-Container is at 10.0.0.1:8080, Send-Container is at 10.0.0.2:8080).

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html

Each ECS Task has different IP. So no port conflicts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM