This topic describes how to configure health checks to monitor the conditions of server groups. This helps you evaluate the availability of the backend servers in the server groups.
- Log on to the Server Load Balancer console.
- In the left-side navigation pane, choose .
- On the Health Check page, click Create Health Check.
- Configure the health check parameters and click Create.When the system attempts to retry a health check frequently, the availability of your workloads may be affected. We recommend that you use default settings when you configure health checks.
Parameter Description Name Enter a name for the health check. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. Health Check Protocol Select the protocol of the health check. Valid values:
- HTTP: To perform HTTP health checks, ALB sends HEAD or GET requests to a backend server to check whether the backend server is healthy.
- TCP: To perform TCP health checks, ALB sends SYN packets to a backend server to check whether the port of the backend server is open.
Health Check Method Select a method for the health check. Valid values: HEAD and GET.
Note This parameter is effective only when HTTP is specified as the health check protocol.
- HEAD: By default, HTTP health checks use the HEAD method. Make sure that your backend servers support HEAD requests. If your backend server does not support the HEAD method or the HEAD method is disabled, the health check may fail. In this case, you can use the GET method.
- GET: If the length of a response exceeds 8 Kb, the response is truncated. However, the health check result is not affected.
HTTP Version Select an HTTP version. You can select HTTP1.0 or HTTP1.1.Note This parameter is effective only when HTTP is specified as the health check protocol. Port Select the port that is probed to check whether a backend server is healthy.
- Use the ports of backend servers: By default, the ports of backend servers are probed.
- Specify a port: Manually specify the port to be probed. Valid values: 1 to 65535.
Path Enter the URL of the web page that is requested by health checks. We recommend that you enter the URL of a static web page. The URL must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URL can also contain the following extended characters:
_ ; ~ ! ( ) * [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/).
By default, to perform health checks, ALB sends HTTP HEAD requests to the default homepage configured on a backend Elastic Compute Service (ECS) instance through the private IP address of the ECS instance. If you do not want to use the default homepage for health checks, you can manually specify a URL.
Domain Name Optional. Enter a domain name for the health check.
- Use the private IP addresses of backend servers (default): By default, the private IP addresses of backend servers are used for health checks.
- Specify a domain name: Enter a domain name. The domain name must be 1 to 80 characters in length. It can contain only lowercase letters, digits, periods (.), and hyphens (-). The domain name must contain at least one period (.). The domain name cannot start or end with a period (.).
Normal Status Code Select the HTTP status code that indicates a successful health check. Valid values: http_2xx (default), http_3xx, http_4xx and http_5xx.Note This parameter is effective only when HTTP is specified as the health check protocol. Response Timeout Period Specify the timeout period for a health check response. If a backend ECS instance does not return an expected response within the specified period of time, the backend server is declared unhealthy.
Valid values: 1 to 300. Default value: 5. Unit: seconds.
Health Check Interval Specify the interval between two consecutive health checks.
Valid values: 1 to 50. Default value: 2. Unit: seconds.
Healthy Threshold Specify the number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy.
Valid values: 2 to 10. Default value: 3.
Unhealthy Threshold Specify the number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy.
Valid values: 2 to 10. Default value: 3.