Parth walks you through
working with health checks
for a Classic Load Balancer


How do I configure, update, and verify health checks for a Classic Load Balancer?

Elastic Load Balancing health checks automatically connect to backend instances to make sure they're reachable by your load balancer. You can use the HTTP, TCP, HTTPS, or SSL protocols for health checks.

The TCP and SSL protocols perform health checks at layer 4. For TCP, you specify a port, and the load balancer attempts to open a TCP connection to the instance on the specified port. For SSL, a health check attempts to establish both a TCP connection and an SSL connection. If the instance doesn't accept the connection within a set timeout value, the health check reports the instance as unhealthy.

Note: It's possible that a backend instance can establish a TCP connection, therefore passing the health check, but that the application running on the instance isn't able to respond.

The HTTP and HTTPS protocols perform health checks at layer 7. You specify a target path and port, and an HTTP GET request is issued to the instance on the given path and port. Any instance that doesn't respond "200 OK" within the timeout period is reported by the health check as unhealthy. Using HTTP and HTTPS-based health checks allows you to compare failed health checks against the backend instance's web server access logs, enabling you to troubleshoot potential issues more effectively.

If you have health checks configured, any new instances registered to your load balancer are automatically issued a health check. If the health check succeeds, the instance is marked as InService and used by the load balancer.

You can set the port the health check uses, the duration of the timeout, and the number of consecutive checks ("threshold") needed to change an instance's health status. If the instance fails a health check a certain amount of times consecutively (the "unhealthy" threshold), the load balancer takes the instance out of service. If an out-of-service instance passes a health check a certain amount of times consecutively (the "healthy" threshold), the load balancer puts the instance back in service.

Health checks are not required to use the same port and protocol as the listeners on the load balancer. You can have listeners on multiple ports and the health check querying a different port. This means you can run a health checking service that verifies the health of the services running on the other ports before responding to the health check query.

You can choose to set up health checks when you're creating the Classic Load Balancer, or you can add or update the health checks of the Classic Load Balancer after it's launched. You can also configure health checks using the configure-health-check AWS CLI command. After health checks are set up, you can use them to monitor the health of the instances behind the load balancer in the EC2 console.

For information about CloudWatch metrics related to the load balancer, see View CloudWatch Metrics for Your Load Balancer.

ELB, health check, Classic Load Balancers, TCP, SSL

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-12-29