Configuring Health Checks

You can configure health checks to periodically test the availability and the health of the back-end instances of a load balancer in order to send requests only to healthy and available ones. You can configure only one health check type per load balancer, specifying the back-end instances port and protocol to check.

Health checks consist in sending regular pings to back-end instances at a specified time interval. A back-end instance is considered healthy or unhealthy depending on a specified number of consecutive successful or failed pings. A ping is considered as failed when an instance does not respond to this ping within a specified time period. When an instance previously considered as unhealthy becomes healthy again, the load balancer automatically sends requests to it again, with no action on your side.

Configuring Health Checks Using Cockpit v1

  1. Click Services > Load Balancers.

  2. Click the load balancer for which you want to configure health checks.
    The load balancer is selected and its details appear.

  3. Click Health Checks.
    A panel with information about health checks for the load balancer appears.

  4. Click Configure Health Checks .
    The CONFIGURE HEALTH CHECKS FOR XXX dialog box appears.

  5. Configure your health checks:

    1. In the Target field, type the back-end instances protocol and port to check, in the protocol:port/path format.

      You can type the following values:

      • Protocol: TCP, SSL, HTTP or HTTPS

      • Port: Between 1 and 65535 (both included)

      • Path: If you use the HTTP or HTTPS protocols, the ping path (for example, HTTP:80/index.html)

    2. In the Interval field, type the number of seconds between two pings (between 5 and 600 both included, by default 30).

    3. In the Timeout field, type the maximum waiting time for a response before considering the instance as unhealthy, in seconds (between 2 and 60 both included, by default 5).

    4. In the Unhealthy Threshold field, type the number of consecutive failed pings to consider the instance as unhealthy (between 2 and 10 both included, by default 2).

    5. In the Healthy Threshold field, type the number of consecutive successful pings to consider the instance as healthy (between 2 and 10 both included, by default 10).

  6. Click Configure to validate.
    The health checks are configured and the information in the panel are modified.

Configuring Health Checks Using OSC CLI

See the UpdateLoadBalancer command sample in the documentation of the OUTSCALE API.

Configuring Health Checks Using AWS CLI

To configure health checks for a load balancer, use the configure-health-check command following this syntax:

Request sample
$ aws elb configure-health-check \
    --profile YOUR_PROFILE \
    --load-balancer-name LB_NAME \
    --health-check Target=HTTP:80/home/index.html,Interval=60,Timeout=5,UnhealthyThreshold=5,HealthyThreshold=2 \
    --endpoint https://lbu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • load-balancer-name: The name of the load balancer.

  • health-check: The configuration for the health checks. This attribute requires the following elements:

    • Target: The back-end instances protocol and port to check, in the protocol:port/path format.

      You can type the following values:

      • Protocol: TCP, SSL, HTTP, or HTTPS

      • Port: Between 1 and 65535 (both included)

      • Path: If you use the HTTP or HTTPS protocols, the ping path (for example, HTTP:80/index.html)

    • Interval: The number of seconds between two pings (between 5 and 600 both included, by default 30).

    • Timeout: The maximum waiting time for a response before considering the instance as unhealthy, in seconds (between 2 and 60 both included, by default 5).

    • UnhealthyThreshold: The number of consecutive failed pings to consider the instance as unhealthy (between 2 and 10 both included, by default 2).

    • HealthyThreshold: The number of consecutive successful pings to consider the instance as healthy (between 2 and 10 both included, by default 10).

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The configure-health-check command returns the following elements:

  • HealthCheck: Information about the updated health checks. This element contains the following information:

    • HealthyThreshold: The number of consecutive successful pings to consider the instance as healthy.

    • Interval: The number of seconds between two pings.

    • Target: The back-end instances protocol and port to check, and the ping path if you are using HTTP protocol.

    • Timeout: The maximum waiting time for a response before considering the instance as unhealthy, in seconds.

    • UnhealthyThreshold: The number of consecutive failed pings to consider the instance as unhealthy.

Result sample
{
   "HealthCheck": {
       "HealthyThreshold": 2,
       "Interval": 60,
       "Target": "HTTP:80/home/index.html",
       "Timeout": 5,
       "UnhealthyThreshold": 5
   }
}

The health checks are configured for the specified load balancer.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.