Global Accelerator (GA) performs health checks to test the status of endpoints. Health checks improve service reliability and availability and prevent service interruptions caused by unhealthy endpoints.

Introduction to health checks

You can enable health checks for endpoint groups of a GA instance. After you enable health checks, GA periodically checks whether the endpoints are healthy. When GA detects an unhealthy endpoint, GA distributes new requests to other healthy endpoints. When the unhealthy endpoint recovers, GA distributes requests to the endpoint again.

GA supports health checks that use the following protocols: TCP, HTTP, and HTTPS.

TCP health checks

A TCP health check probes whether a server port is healthy at the network layer by sending SYN packets to the port. The following figure shows the process of TCP health checks.TCP Health Checks
No. Description
1 A GA instance sends a TCP SYN packet to the IP address and port of an endpoint based on the health check configurations of the TCP listener.
2 The GA instance verifies the health status of the endpoint based on whether the endpoint can return an SYN-ACK packet within the specified timeout period.
  • If the GA instance receives an SYN-ACK packet from the endpoint within the specified timeout period (3 seconds), the endpoint is considered healthy.
  • If the GA instance receives an RST packet from the endpoint within the specified timeout period (3 seconds), the endpoint is considered unhealthy.
  • If the GA instance does not receive an SYN-ACK packet from the endpoint within the specified timeout period (3 seconds), the GA instance considers that the endpoint cannot be reached or respond. As a result, the endpoint is considered unhealthy.
Note The response timeout period specifies the maximum amount of time to wait for a health check response. If an endpoint does not respond within the specified timeout period, the endpoint fails to pass the health check. By default, the timeout period is set to 3 seconds and cannot be changed.
3 After the GA instance receives an SYN-ACK packet from the endpoint, the GA instance sends an ACK packet to establish a TCP session.

HTTP and HTTPS health checks

An HTTP health check probes whether an endpoint is healthy by simulating HTTP GET requests sent from a browser. The following figure shows the process of HTTP health checks.HTTP Health Checks
No. Description
1 A GA instance sends an HTTP GET request to an endpoint based on the health check configurations of the listener. The HTTP GET request is sent to an address in the following format: the IP address of the endpoint + health check port + health check path.
2 After the endpoint receives the request, the endpoint checks the status of the service and returns a relevant HTTP status code.
  • If the GA instance receives the 200 status code from the endpoint within the specified timeout period (3 seconds), the endpoint is considered healthy.
  • If the GA instance receives a status code other than the 200 status code from the endpoint within the specified timeout period (3 seconds), the endpoint is considered unhealthy.
  • If the GA instance does not receive a status code from the endpoint within the specified timeout period (3 seconds), the GA instance considers that the endpoint cannot be reached or respond. As a result, the endpoint is considered unhealthy.
Note The response timeout period specifies the maximum amount of time to wait for a health check response. If an endpoint does not respond within the specified timeout period, the endpoint fails to pass the health check. By default, the timeout period is set to 3 seconds and cannot be changed.

Health check time window

Health checks improve the availability of your services. However, frequent failovers caused by unhealthy endpoints may affect system availability. Health check time windows are introduced to control failovers. A failover is performed only if an endpoint consecutively passes or fails a specific number of health checks within a time window. The health check time window is determined by the following factors:
  • Health check interval: the interval at which health checks are performed.
  • Response timeout: the amount of time to wait for a response.
  • Healthy threshold: the number of consecutive successes or failures of health checks.
The health check time window is calculated based on the following formula:
  • Time window for health check failures = Response timeout × Healthy threshold + Health check interval × (Healthy threshold - 1)
    The following figure shows an example in which the response timeout is 3 seconds, the health check interval is 2 seconds, and the healthy threshold is 3 times. Therefore, the time window for health check failures is 13 seconds based on the formula 3 × 3 + 2 × (3 - 1). Time Window for Health Check Failures
  • Time window for health check successes = (Response time of a successful health check × Healthy threshold) + Heath check interval × (Healthy threshold - 1)
    The following figure shows an example in which the response time is 1 second, the health check interval is 2 seconds, and the healthy threshold is 3 times. Therefore, the time window for health check successes is 7 seconds based on the formula 1 × 3 + 2 × (3 - 1). Time Window for Health Check Successes

Limits

If your GA instance uses UDP listeners, you can enable health checks for an endpoint only if the endpoint is associated with a TCP, HTTP, or HTTPS service. Otherwise, the endpoint is marked as abnormal.

Enable health checks

  1. Log on to the Global Accelerator console.
  2. On the Instances page, find the GA instance that you want to manage and click Configure Listeners in the Actions column.
  3. On the Listeners tab, find the listener that you want to manage and click Modify in the Actions column.
  4. On the Edit Listener page, click Next.
  5. In the Health Check section of the Configure Endpoint Group wizard page, enable the health check feature and set the following parameters.
    Parameter Description
    Health Check Protocol Select the protocol that you want to use for health checks. Valid values: TCP, HTTP, and HTTPS.
    • A TCP health check probes whether a server port is healthy at the network layer by sending SYN packets to the port.
    • An HTTP health check probes whether an endpoint is healthy by simulating HTTP GET requests sent from a browser.
    Port Set the port of the endpoint to which probe packets are sent for health checks.

    Valid values: 1 to 65535.

    Health Check Interval Set the interval between two consecutive health checks. Unit: seconds.

    Valid values: 1 to 50. Default value: 2.

    URI Specify the URI for health checks.

    The URI must be 1 to 80 characters in length and start with a forward slash (/). The URI can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI can also contain the following extended characters: _ ; ~ ! ( ) * [ ] @ $ ^ : ' , +.

    By default, GA sends a GET request to the default homepage of the backend service. If you do not want to use the default homepage for health checks, you can manually specify a URI.

    Note This parameter is supported only for HTTP and HTTPS health checks.
    Healthy Threshold The number of consecutive health check failures that must occur before a healthy endpoint is considered unhealthy, or the number of consecutive health check successes that must occur before an unhealthy endpoint is considered healthy.

    Valid values: 2 to 10. Default value: 3.

  6. Click Next. On the Confirm wizard page, confirm the health check configurations and click Submit.

What to do next

Operation Description
Modify health check configurations
  1. On the Listeners tab, find the listener and click Edit Endpoint Group in the Actions column.
  2. In the Health Check section of the Configure Endpoint Group wizard page, modify the health check protocol, port, and health check interval and click Next.

    For more information, see Enable health checks.

  3. On the Confirm wizard page, click Next.
Disable health checks
  1. On the Listeners tab, find the listener and click Edit Endpoint Group in the Actions column.
  2. In the Health Check section of the Configure Endpoint Group wizard page, disable the health check feature and click Next.
  3. On the Confirm wizard page, click Next.

Related topics

  • CreateEndpointGroup: Creates an endpoint group. You can configure health checks when you create an endpoint group.
  • UpdateEndpointGroup: Modifies an endpoint group. You can configure health checks when you modify an endpoint group.
  • GetHealthStatus: Queries health check information about an endpoint.