Friday, February 17, 2012

Part3:(Amazon ELB Series) Monitoring ELB using CloudWatch



Elastic Load Balancing provides data about the load balancers and the back-end EC2 application instances to Amazon CloudWatch. The Amazon CloudWatch service collects the data and presents it as readable, near real-time metrics. For example, we can monitor the number of unhealthy instances behind the load balancer in an Availibility Zone over a specified time period. By Default Elastic Load Balancing is enabled with Detailed Monitoring of CloudWatch.


Elastic Load Balancing only shows Amazon CloudWatch metrics when requests are flowing through the load balancer. If there are no requests are flowing then the metric will not be reported to CloudWatch.






Some of the ELB - CloudWatch metrics are :


Latency : Time elapsed after the ELB receives a request until it receives the corresponding response


RequestCount: The number of requests handled by the Elastic Load balancer


HealthyHostCount: The number of healthy Amazon EC2 instances active under a specified load balancer in a specified Availability Zone


UnHealthyHostCount : The number of unhealthy Amazon EC2 instances controlled by a specified load balancer in a specified Availability Zone.

HTTPCode_ELB_4XX: Number of Client error HTTP response codes generated by Elastic Load Balancing 

HTTPCode_ELB_5XX: Number of HTTP response codes generated by Elastic Load Balancing that are in the 5xx (server error) series. Elastic Load Balancing may generate 5xx errors if no back-end EC2 instances are registered or no healthy EC2 back-end instances

HTTPCode_Backend_2XX: Number of Success HTTP response codes generated by back-end instances 

HTTPCode_Backend_3XX: Number of HTTP response codes generated by back-end instances that are in the 3xx (user action required) series.

HTTPCode_Backend_4XX: Count of HTTP response codes generated by back-end instances that are in the 4xx (client error) series. This response count does not include any responses that were generated by Elastic Load Balancing.

HTTPCode_Backend_5XX: Count of HTTP response codes generated by back-end instances that are in the 5xx (server error) series. This response count does not include any responses that were generated by Elastic Load Balancing.

3 comments:

Randeep said...

Hi, I have on ec2 instance running in us-east. I want to create a load balancer such a way that one new instance will be spawned when load is high and will balance the load by sharing with the first one. This can be configured with cloud watch? or do you have any other suggestions?

Harish Ganesan said...

Hi Randeep,

1)Configure Amazon AutoScaling for your web/App EC2 instance residing under your ELB
2)Amazon Autoscaling will require your web/App EC2 to be enabled with Detailed CloudWatch monitoring
3)Attach Amazon Autoscaling with the ELB
4) When the load increases ex. CPU touches 80% in web/App EC2, Amazon AutoScaling will automatically get to know this from CloudWatch and it will scale out a new instance

So in short you need ELB , Detailed CloudWatch configured in EC2, Amazon AutoScaling combined with CloudWatch and ELB to achieve the objective.

I have written some detailed posts /Presentations on Auto scaling with ELB , refer those , it might be of use to you.

Anand Sinha said...

Hi.
I have a load balancer which was operating successfully, then all of a sudden it stopped responding. I can directly query the ec2 instances and they respond correctly.
How do I determine if the load balancer itself is working correctly?

Need Consulting help ?

Name

Email *

Message *

DISCLAIMER
All posts, comments, views expressed in this blog are my own and does not represent the positions or views of my past, present or future employers. The intention of this blog is to share my experience and views. Content is subject to change without any notice. While I would do my best to quote the original author or copyright owners wherever I reference them, if you find any of the content / images violating copyright, please let me know and I will act upon it immediately. Lastly, I encourage you to share the content of this blog in general with other online communities for non-commercial and educational purposes.

Followers