Will the "TargetConnectionErrorCount" be counted even if there are two servers in the target group and one cannot respond?

0

I want to ask the case:

I have 2 Webservers in 1 target group. I think that if the connection from ALB to only 1 between/among targets have something wrong, the TargetConnectionErrorCount will be count.

When testing, I make one of my webserver become can not connect (Request timed out) by changing the Security group. I think that TargetConnectionErrorCount will be counted here, but it not. I have to make all of my targets become unhealthy to see the TargetConnectionErrorCount be count (see the attached images)

Is it right that only when all the target servers in the target group healthcheck fail will the TargetConnectionErrorCount metrics be counted?

Attached image here: https://live.staticflickr.com/65535/52061333803_d622b9a25c_b.jpg

已提問 2 年前檢視次數 3888 次
1 個回答
1
已接受的答案

Hi, and thanks for reaching out!

The TargetConnectionErrorCount metric will increment any time the ALB encounters an error in establishing a TCP connection with a target. In this case, it sounds like the first failed request that was made after changing the Security Group was still in flight over the connection that is maintained between an ALB and a target. This would not increment the TargetConnectionErrorCount metric.

The next request after this may have then come in after the second target had already been marked Unhealthy, and therefore no further requests were routed to it.

In the case of all targets being unhealthy, the ALB exhibits fail-open behavior, routing requests to all registered targets, regardless of health status. As a result, the ALB attempts to make connections with each of them, but fails in each attempt, causing the TargetConnectionErrorCount to increment.

Hope this helps!

AWS
支援工程師
已回答 2 年前
profile picture
專家
已審閱 17 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南