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

asked 2 years ago3850 views
1 Answer
1
Accepted Answer

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
SUPPORT ENGINEER
answered 2 years ago
profile picture
EXPERT
reviewed 13 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions