[ECS] Daemon services with awsvpc?

0

Is it possible to run daemon services with tasks using the the awsvpc networking mode?

I don't think it's possible given that each task using awsvpc would be treated as a separate instance (even if they're on the same EC2 instance), but wanted to double check as it seems kind of a waste to run multiple copies of my sidecars (cloudwatch, xray, etc.) on an EC2 instance.

If not possible, is there a workaround or recommendation to replicate the functionality of daemon services for tasks using awsvpc networking modes?

1개 답변
0
수락된 답변

I haven't played with Daemons as of late but I don't see how the networking model would come in the way. The "each task using awsvpc would be treated as a separate instance" is true when it comes to the network stack as in the task will get a dedicated VPC address but the task will run on the container instance and so the property of REPLICA Vs. DAEMON are orthogonal to what model you use to connect those tasks.

AWS
전문가
답변함 2년 전
  • Thank you. I found the reference in the documentation (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking-awsvpc.html)

    When a task is started with the awsvpc network mode, the Amazon ECS container agent creates an additional pause container for each task before starting the containers in the task definition. It then configures the network namespace of the pause container by running the amazon-ecs-cni-plugins CNI plugins. The agent then starts the rest of the containers in the task so that they share the network stack of the pause container. This means that all containers in a task are addressable by the IP addresses of the ENI, and they can communicate with each other over the localhost interface.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠