简体   繁体   English

AWS ECS Fargate 端口映射

[英]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.我有 ECS 集群。其中有两个任务定义,每个任务定义只有一个容器。我们在这里使用 ECS fargate model,网络类型为 awsvpc。

Task Definition 1: Query-Conatiner Task Definition 2: Send-Conatiner任务定义 1:Query-Conatiner 任务定义 2:Send-Conatiner

Now there are 2 services for each of the two task definitions above.现在,上面的两个任务定义中的每一个都有 2 个服务。

Query-Conatiner and Send-Conatiners both are mapped to port 8080 of host. Query-Conatiner 和 Send-Conatiner 都映射到主机的 8080 端口。

Wont there be any conflict as both ports are mapped to 8080?两个端口都映射到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).使用 awsvpc 时,每个容器都被分配了不同的弹性网络接口 (ENI),因此每个容器将具有不同的 IP,因此不会发生端口冲突(例如 Query-Container 位于 10.0.0.1:8080,Send-Container 位于 10.0 .0.2:8080)。

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

Each ECS Task has different IP.每个 ECS 任务有不同的 IP。 So no port conflicts.所以没有端口冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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