Luminary Healthcare is modernizing its legacy patient record indexing engine by migrating it to AWS. The workload consists of a front-end user interface container and a back-end indexing processor container. The legacy code is hardcoded to communicate over the local loopback address () on port . The company wants to deploy this solution to Amazon ECS using the AWS Fargate launch type to eliminate EC2 instance provisioning and minimize operational overhead. Traffic between the two containers must remain private and secure without transiting external load balancers. Which configuration should the Solutions Architect select to meet these requirements?
- Define both the front-end and back-end containers in a single Amazon ECS task definition, and deploy it to a service using the AWS Fargate launch type. Because AWS Fargate requires the awsvpc network mode, the containers will share the task network namespace and communicate over the loopback interface.Cevap
- BDefine the front-end and back-end containers in separate Amazon ECS task definitions, configure the task definitions to use the host network mode, and deploy them to the same ECS cluster using the AWS Fargate launch type to bind the containers directly to the underlying host interface.
- CDefine the front-end and back-end containers in separate Amazon ECS task definitions, deploy them to separate ECS services using the awsvpc network mode, and route traffic between them using an Application Load Balancer with a Route 53 Private Hosted Zone that is created in the AWS account but not associated with the VPC.
- DDefine both the front-end and back-end containers in a single Amazon ECS task definition, configure the task definition to use the bridge network mode, and map the containers using Docker links to allow direct port communication over the bridge network interface on AWS Fargate.
Cevap
Defining both containers in a single task definition on AWS Fargate allows them to share the task's network namespace (due to the mandatory awsvpc network mode) and communicate over the local loopback interface ().
Defining both containers in a single task definition under the AWS Fargate launch type is correct because AWS Fargate mandates the awsvpc network mode. Under awsvpc, all containers within the same task share the same elastic network interface (ENI) and network namespace, allowing them to communicate via localhost () on their respective ports, fulfilling the hardcoded configuration without external load balancers.
Adım Adım Çözüm
Anahtar Kavram
Fargate Task Networking