AWS Load Balancer Error Codes and Monitoring
Load Balancer Error Codes
- 2XX Success Codes
- 4XX Client Error Codes
400: Bad Request.
401: Unauthorized.
403: Forbidden.
460: Client Closed Connection.
463: X-Forwarded-For Header Malformed.
- 5XX Server Error Codes
500: Internal Server Error.
502: Bad Gateway.
503: Service Unavailable (EC2 instances not responding).
504: Gateway Timeout.
561: Unauthorized.
Key Points for Exam
- 4XX: Indicates client-side problems.
- 5XX: Indicates server-side problems.
Load Balancer Metrics in CloudWatch
- Backend Connection Errors: Monitor errors from EC2 instances.
- HealthyHostCount: Number of healthy instances.
- UnHealthyHostCount: Number of unhealthy instances.
- 2XX/3XX/4XX/5XX Counts: Indicate success, redirection, client errors, and server errors, respectively.
- Latency: Time taken to respond to clients.
- RequestCounts: Total requests for the ALB.
- RequestCountPerTarget: Average requests received by each EC2 instance.
- SurgeQueueLength: Pending requests routed to healthy instances (max value 1000).
- SpilloverCount: Requests rejected due to full queue.
Troubleshooting Using Metrics
- 400 Bad_Request: Malformed request from the client.