What specificaly is involved in an Elastic Load Balancer health check on an instance?
I know that it performas an HTTP(S) "ping"; does it just deem an instance "Unhealthy" if that HTTP request returns an error status $THRESHOLD
number of times in a row?
Or does it take other factors into account, such as CPU usage?
There are only 2 factors taken into account:
http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/APIReference/API_HealthCheck.html
For TCP: Failure to connect within the configured timeout is considered unhealthy.
For HTTP: Any answer other than "200 OK" within the timeout period is considered unhealthy.
... and of course you need to specify the
Timeout
andUnhealthyThreshold
which will determine how many failures before the instance is flagged Unhealthy.No just the protocol of either HTTP or TCP at this time. With HTTP you can define a "Ping Path" which can point to a file on the web server to make sure not only is the web server up and running but a expected page in rendering, but that's basically it. Thresholds, timeouts, and intervals are all customizable but again only for the HTTP and TCP protocols.