You have an ECS service running tasks behind an Application Load Balancer (ALB). Which configuration ensures that the ALB correctly routes traffic to the ECS tasks?
Think about how ECS integrates with ALB to manage dynamic task IPs.
The ECS service must be configured with the ALB target group ARN so that ECS can automatically register and deregister task IPs with the ALB target group. This enables proper routing of traffic to running tasks.
When using an ALB with ECS, what happens if a task fails the ALB health check?
Consider how ECS maintains service availability with unhealthy tasks.
If a task fails the ALB health check, ECS marks it unhealthy and replaces it to keep the desired number of healthy tasks running.
You want to ensure that only traffic from your ALB can reach your ECS tasks. Which security group configuration achieves this?
Think about how security groups reference each other to restrict traffic.
By allowing inbound traffic on ECS tasks only from the ALB's security group, you ensure that only the ALB can send traffic to the tasks, enhancing security.
You have multiple ECS services behind one ALB. How do you configure the ALB to route requests to the correct ECS service?
Consider how ALB can route traffic based on URL paths.
ALB listener rules can route traffic based on URL paths to different target groups, each associated with a different ECS service, enabling multiple services behind one ALB.
To maximize availability and fault tolerance for an ECS service behind an ALB, which setup is best?
Think about spreading risk and balancing traffic evenly.
Deploying ECS tasks across multiple Availability Zones and enabling ALB cross-zone load balancing ensures traffic is evenly distributed and service remains available if one zone fails.