Health checks

更新时间:
复制 MD 格式

Enable health checks to improve service availability. If a backend ENS instance fails a health check, Edge Load Balancer (ELB) automatically routes new requests to other healthy ENS instances. When the failed instance recovers, ELB automatically resumes routing requests to it.

Why configure health checks

Server Load Balancer uses health checks to determine the availability of backend servers (ENS instances). This improves the overall availability of your frontend service by preventing requests from being routed to unhealthy instances.

Note
  • If your service is sensitive to load, frequent health checks might affect normal service access.

  • To reduce the impact on your service, you can lower the health check frequency, increase the health check interval, or switch from Layer 7 to Layer 4 health checks.

  • Health checks are enabled by default. In most cases, the default configurations are sufficient. You can also modify the default configurations.

Procedure

  1. Log on to the ENS console.

  2. In the navigation pane on the left, click Edge Load Balancer > ELB Instance.

  3. On the Edge Load Balancer Instances page, find the target instance and click Listener Configuration in the Actions column.

  4. On the Listener tab, click Add Listener, or find the target listener and click Modify in the Actions column.

  5. Follow the wizard to configure the listener until you reach the Health Check configuration page. Health checks are enabled by default. Click Modify and configure the health check settings.

Health check configuration

Description

Health Check Protocol

Select the protocol for health checks. If the listener uses the TCP protocol, you can select TCP or HTTP for health checks.

  • TCP mode: Performs a network-layer check by sending SYN handshake messages to determine if the server port is active.

  • HTTP mode: Simulates browser access by sending HEAD or GET requests to check if the server application is healthy.

Health Check Method

Layer 7 (HTTP or HTTPS) listeners support HEAD (default) and GET methods for health checks.

If your backend application server does not support the HEAD method or has it disabled, use the GET method for health checks.

Note

This setting is available only for HTTP and HTTPS listeners.

Health check path and health check domain name (Optional)

For HTTP health checks, the load balancing system sends an HTTP HEAD request to the default home page of the application server using the private IP address of the backend ENS instance. If the page used for health checks is not the default home page of the application server, specify a health check path.

Note

This setting is available only for HTTP and HTTPS listeners.

Normal Status Codes

Select the HTTP status codes that indicate a successful health check.

Note

This setting is available only for HTTP and HTTPS listeners.

Health check port

The port that the health check service uses to probe the backend server.

Note

The default value is the backend port specified when you configure the listener.

Health Check Response Timeout

The amount of time to wait for a response from a health check. If a backend ENS instance does not return a response within the specified period, the health check fails. The value can range from 1 to 300 seconds.

  • The default value for UDP listeners is 10 seconds.

  • The default value for HTTP, HTTPS, or TCP listeners is 5 seconds.

Health Check Interval

The interval between health checks. The value can range from 1 to 50 seconds.

  • The default value for UDP listeners is 5 seconds.

  • The default value for HTTP, HTTPS, or TCP listeners is 2 seconds.

Healthy Threshold

The number of consecutive successful health checks required for an unhealthy ENS instance to be considered healthy.

  • Value range: 2 to 10.

  • Default value: 3.

Unhealthy Threshold

The number of consecutive failed health checks required for a healthy ENS instance to be considered unhealthy.

  • Value range: 2 to 10.

  • Default value: 3.