The task is running but the ALB marks it unhealthy. What next?
After this you can answer: The task is running but the ALB marks it unhealthy. What next?
Say it in 30 seconds
Section titled “Say it in 30 seconds”The deeper answer
Section titled “The deeper answer”The target groups expect HTTP 200, check every 15 seconds and allow five seconds per check. The shared configuration requires two successful checks for recovery and three failures for an unhealthy state. Startup grace belongs to the ECS service and must be considered separately from target-group timing.
The API listens for the load balancer on the application port, not the Service Connect proxy port. A process bound only to loopback can pass a container-local check while failing the ALB check. Web task configuration explicitly sets its listening hostname for external reachability.
Do not equate all unhealthy targets with a guaranteed 503. AWS documents fail-open routing when a target group contains only unhealthy registered targets. No targets or unused targets are a different condition. Check registration, health reason and observed response independently. A healthy /health can coexist with failed bookings when Postgres is unavailable.
Counter-questions
Section titled “Counter-questions”Would you change /health to require every dependency?
What if it only fails during deploy?
Can curl from inside the container prove ALB access?
Where in MiniTickets
Section titled “Where in MiniTickets”Read the path chapter, select the relevant map piece →, then inspect infra/src/entry/target-groups.ts → createTargetGroups. Work through the related case for a diagnostic example.
Read this book online: https://book.theversehub.in/