Help Center> Elastic Load Balance> User Guide> Health Check> Configuring a Health Check

Configuring a Health Check

Scenarios

You can configure a health check when you add a listener. If you have no special requirements, retain the default settings. You can also disable health checks or change the health check settings.

To change the health check settings of a classic load balancer, locate the listener and click Modify in the Operation column.

To configure a health check or change the health check settings of a shared load balancer, perform the operations in this topic.

Function Description

  • The health check protocol and backend protocol are independent of each other. They can be the same or different from each other.
  • To reduce the CPU usage of backend servers, it is recommended that you use TCP for health checks. If you want to use HTTP as the health check protocol, use static files to return the health check results.
  • You can increase the health check interval to reduce the health check frequency.
  • If you have enabled health checks, request routing over established connections is not affected, and the load balancer immediately checks the health of backend servers. If a backend server is detected as healthy, the load balancer routes requests over the new connection based on the configured listening rules and server weight. If a backend server is detected as unhealthy, the load balancer stops routing traffic to this server. Enable health checks during off-peak hours.

Procedure

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Click Service List. Under Network, click Elastic Load Balance.
  4. Locate the load balancer and click its name.
  5. Click Backend Server Groups, locate the backend server group, and click its name.
  6. In the Basic Information area, click Configure beside Health Check.
  7. In the Configure Health Check dialog box, enable or disable health checks. Set the parameters by referring to Table 1.
    Table 1 Parameters for configuring a health check

    Parameter

    Description

    Example Value

    Enable Health Check

    Specifies whether to enable health checks.

    N/A

    Protocol

    • Specifies the protocol used by the load balancer to perform health checks on backend servers. You can use either TCP or HTTP. You cannot change the protocol after the health check is configured.
    • If the frontend protocol is UDP, the health check protocol is UDP by default.

    HTTP

    Domain Name

    Specifies the domain name in the health check request. The domain name can contain digits, letters, hyphens (-), and periods (.), and must start with a digit or letter. Configure this parameter only if you have set Protocol to HTTP.

    www.elb.com

    Port

    Specifies the port used by the load balancer to perform health checks on backend servers.

    Port range: 1 to 65535

    NOTE:

    This parameter is optional. If you do not specify a health check port, the port of each backend server will be used for health checks by default.

    80

    Interval (s)

    Specifies the maximum time between health checks, in seconds.

    The interval ranges from 1 to 50.

    5

    Timeout (s)

    Specifies the maximum time required for waiting for a response from the health check, in seconds. The timeout duration ranges from 1 to 50.

    NOTE:

    The timeout must be less than or equal to the interval. Otherwise, the value set for the interval will be used as the timeout.

    3

    Check Path

    Specifies the health check URL, which is the destination on backend servers for health checks. Configure this parameter only if you have set Protocol to HTTP. The path can contain 1 to 80 characters and must start with a slash (/).

    /index.html

    Maximum Retries

    Specifies the maximum number of health check retries. The value ranges from 1 to 10.

    3

  8. Click OK.