ECS: Should I use ALB healthchecks, container healthchecks, or both?

0

For ECS services that integrate with my ALB, should I be using the Load Balancer healthchecks or ECS container healthchecks? I'm currently using the ALB healthchecks, but am seeing a Health Status of Unknown in the ECS console (see attached image). I also noticed that ALB connected services are slow to register as healthy with my ECS cluster (compared to services that just use ECS container healthchecks). What is the way to perform healthchecks for ECS services integrated with ALB?

ECS Status

3개 답변
1

The status is UNKNOWN because the ECS health check is not defined.
It is UNKNOWN as per specifications.
https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html

If you are using ALB health checks, there is no need to add ECS health checks as well.
If the health check path accessed by the ALB health check check checks the normality of the application, then there should be no problem.
If ALB is slow to become healthy, it may be a good idea to review the health check thresholds, etc.

Incidentally, if both health checks are set, the task will be replaced if one of them becomes UNHEALTHY.

profile picture
전문가
답변함 일 년 전
1

I've just been asking myself the same question.

I'm sure the previous answers are correct that there is no strict requirement to add ECS health checks, but I absolutely hate that the ECS console is going to report a health status of UNKNOWN forever if I just rely on the ALB.

Therefore I am planning to add the ECS health checks anyway.

Would be great if AWS could make this a bit more intuitive, maybe add a status of NOT REQUIRED if the health checks are really not required.

답변함 일 년 전
0

No need of setting up health checks for ecs container if ALB health check is already in place. Incase your ALB health check is slow then revisit your health check setting in the target group attached with your ALB and look for below.

  1. Healthy threshold
  2. Path
답변함 일 년 전

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

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

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

관련 콘텐츠