AWS/Application Load Balancer
ECS Task를 ALB Target 등록 시 Healthcheck fail 이슈
워니주니구니
2020. 10. 27. 15:23
728x90
SMALL
- 개요
ALB -> TargetGroup ->Task(Fargate) Health Check
- 현상
ECS fargate를 사용하던 중에 ALB에 target으로 task가 IP로 등록되는 과정에서 계속 initial -> unhealthy -> draining 이 반복
- 1차 조치
health check interval을 300s까지 늘려서 처리는 하였으나, healthy status를 받는데 거의 600s 소요
- 2차 초치
최초 task가 target그룹에 join할 때 상태검사 유예 시간 설정하는 값
"healthCheckGracePeriodSeconds" 값을 조정 (30s)
- 결과
배포 후 조인하는 1분 미만으로 처리
- 참고
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html
https://docs.aws.amazon.com/ko_kr/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html
728x90
LIST