Micheal chores
Micheal chores

Reputation: 159

Why is my ELB cloudwatch metrics HealthyHostCount set to 900?

I have three instances running under ELB in AWS each in 3 different availability zones. When I check the cloudwatch metrics of ELB under Per LB-metrics, the value for HealthyHostCount is 900.

How can this be possible? have I tried to figure it out but did not find any possible solution.

Screenshot of the issue:

Screenshot of the issue

Upvotes: 2

Views: 1401

Answers (1)

Dejan Peretin
Dejan Peretin

Reputation: 12089

For getting a meaningful number of healthy hosts from ELB metrics you have to plot Average, Minimum or Maximum (see ELB metrics doc: http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-cloudwatch-metrics.html)

Sum statistic is not useful for this because there are multiple factors that will affect it:

  • number of hosts in the ELB.
  • number of AZs ELB federates across
  • frequency of health checks
  • period you selected when you graphed your metric
  • potentially something else I didn't think of

For ELB to determine the number of healthy hosts, it has to perform a health check. You can configure frequency of health checks in the ELB settings. ELB will publish value 1 if health check passed. So if you have health checks running every 5 seconds, you'll end up with 12 samples every minute. If you plot Sum, you will get 12 for that minute.

Further more, health checks are also done per AZ, so if you have hosts across 2 AZs number from above is 12 * 2 = 24.

On top of that, when you graph your metric, you have to select a period. In the example above you have 24 checks every minute, so if you graph with a Period of 1h, you'll get 24 * 60 = 1440.

Look at the numbers you have for the parameters mentioned above and try to see how they sum up to 900.

Upvotes: 2

Related Questions