AWS_Lernar
AWS_Lernar

Reputation: 659

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 ?

Upvotes: 0

Views: 4005

Answers (2)

dparnovskiy
dparnovskiy

Reputation: 79

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

Upvotes: 1

Ahmed Agiza
Ahmed Agiza

Reputation: 370

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 (e.g. 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

Upvotes: 4

Related Questions