Sergey Alekseev
Sergey Alekseev

Reputation: 12300

Amazon ELB Health Check the second attempt interval after the first attempt failed

From Amazon docs:
Your load balancer to send request to http:// node IP address:80/index.html every 5 seconds. Allow 3 seconds for the web server to respond. If the load balancer does not get any response after 2 attempts, take the node out of service.

Does a load balancer wait for 5 seconds after the first request failed or does it perform the second request immediately?

Upvotes: 1

Views: 2320

Answers (3)

Makatun
Makatun

Reputation: 1007

Two AWS target group heath check gotchas:

  1. Interval is respected even if health check failed
  2. Timeout is not part of the interval

If you have this setup

Healthy threshold 5 consecutive health check successes
Unhealthy threshold 3 consecutive health check failures
Interval 60 seconds
Timeout 5 seconds

Instance will be declared as unhealthy after 3:05 minutes of the first failed check. (3 x 60 seconds + 5 seconds)

Instance will be declared as healthy after 5 minutes of the first successful check. (5 x 60 seconds)

Upvotes: 1

Mahattam
Mahattam

Reputation: 5743

While configure ELB there are few configurations on which health check depend.

Ping target- Elb will ping on this target using the protocol to get 200 status.
Timeout - This is the timeout period till ELB wait to get the response, ELB terminates the connections if it’s idle for more than timeout setting.
Interval - After this interval ELB will do the health check on instances.
Unhealthy threshold - This is the maximum number after ELB will mark the instance unhealthy and make it outofservice (doesn’t mean terminated)
Healthy threshold - After this threshold ELB will mark instance again healthy and make it inservice.

So if ELB getting first time unhealthy status from instance it will do health check again after the configured interval and it will not make instance unhealthy until the threshold crossed.

Upvotes: 1

Chris Parrinello
Chris Parrinello

Reputation: 91

In my experience, the health check interval is independent on whether or not previous health checks failed or succeeded. So if you have your health check interval set to 5 seconds, you will see checks every 5 seconds in your logs.

That page has an oddly worded description of load balancer health checks and I can't seem to find more detailed information about the health check configuration settings in any of the documentation.

Upvotes: 2

Related Questions