AWS ELB Monitoring
- Elastic Load Balancing publishes data points to CloudWatch about the load balancers and back-end instances
- Elastic Load Balancing reports metrics to CloudWatch only when requests are flowing through the load balancer.
- If there are requests flowing through the load balancer, Elastic Load Balancing measures and sends its metrics in 60-second intervals.
- If there are no requests flowing through the load balancer or no data for a metric, the metric is not reported.
CloudWatch Metrics
- HealthyHostCount, UnHealthyHostCount
- Number of healthy and unhealthy instances registered with the load balancer.
- Most useful statistics are average, min, and max
- RequestCount
- Number of requests completed or connections made during the specified interval (1 or 5 minutes).
- Most useful statistic is sum
- Latency
- Time elapsed, in seconds, after the request leaves the load balancer until the headers of the response are received.
- Most useful statistic is average
- SurgeQueueLength
- Total number of requests that are pending routing.
- Load balancer queues a request if it is unable to establish a connection with a healthy instance in order to route the request.
- Maximum size of the queue is 1,024. Additional requests are rejected when the queue is full.
- Most useful statistic is max, because it represents the peak of queued requests.
- SpilloverCount
- The total number of requests that were rejected because the surge queue is full. Should ideally be 0
- Most useful statistic is sum.
- HTTPCode_ELB_4XX, HTTPCode_ELB_5XX
- Client and Server error code generated by the load balancer
- Most useful statistic is sum.
- HTTPCode_Backend_2XX, HTTPCode_Backend_3XX, HTTPCode_Backend_4XX, HTTPCode_Backend_5XX
- Number of HTTP response codes generated by registered instances
- Most useful statistic is sum.
Elastic Load Balancer Access Logs
- Elastic Load Balancing provides access logs that capture detailed information about all requests sent to your load balancer.
- Each log contains information such as the time the request was received, the client’s IP address, latencies, request paths, and server responses.
- Elastic Load Balancing captures the logs and stores them in the Amazon S3 bucket
- Access logging is disabled by default and can be enabled without any additional charge. You are only charged for S3 storage
CloudTrail Logs
- AWS CloudTrail can be used to capture all calls to the Elastic Load Balancing API made by or on behalf of your AWS account and either made using Elastic Load Balancing API directly or indirectly through the AWS Management Console or AWS CLI
- CloudTrail stores the information as log files in an Amazon S3 bucket that you specify.
- Logs collected by CloudTrail can be used to monitor the activity of your load balancers and determine what API call was made, what source IP address was used, who made the call, when it was made, and so on
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- An admin is planning to monitor the ELB. Which of the below mentioned services does not help the admin capture the monitoring information about the ELB activity
- ELB Access logs
- ELB health check
- CloudWatch metrics
- ELB API calls with CloudTrail
- A customer needs to capture all client connection information from their load balancer every five minutes. The company wants to use this data for analyzing traffic patterns and troubleshooting their applications. Which of the following options meets the customer requirements?
- Enable AWS CloudTrail for the load balancer.
- Enable access logs on the load balancer.
- Install the Amazon CloudWatch Logs agent on the load balancer.
- Enable Amazon CloudWatch metrics on the load balancer
- Your supervisor has requested a way to analyze traffic patterns for your application. You need to capture all connection information from your load balancer every 10 minutes. Pick a solution from below. Choose the correct answer:
- Enable access logs on the load balancer
- Create a custom metric CloudWatch filter on your load balancer
- Use a CloudWatch Logs Agent
- Use AWS CloudTrail with your load balancer
References
Elastic Load Balance developer guide
Excellent blog and post more..Thanks for your detailed information.
Gr8…..thanks…
Hi jay,
Question 3:
Your supervisor has requested a way to analyze traffic patterns for your application. You need to capture all connection information from your load balancer every 10 minutes. Pick a solution from below. Choose the correct answer:
A. Enable access logs on the load balancer
B. Create a custom metric CloudWatch filter on your load balancer
C. Use a CloudWatch Logs Agent
D. Use AWS CloudTrail with your load balancer
It’s asking about the connection info from load balancer to the application. Access log is for the client to loadbalancer not from the loadbalancer to the app.
I think C should be the correct one.
Please advice.
ELB access logs include all the details client details, request processing time, server response, backend processing time. So it provides E2E information.
Excellent blog , I could pass SAA after go over your blog , Thank you .
Congrats and Glad it helped Yong
Excellent blog. i am searching for long . Thank you very much. Keep post. once again Thank you.
Thanks Rangaraja, glad its helping …
like to read this blog for more detail and easy to understand crisp and clear language