Skip to main content

Manage availability checks

A target group can have only one health check.

In a health check, you can edit all parameters except for the check type. If you need to change the check type, you can delete the existing health check and create a new one with the required type via the OpenStack CLI.

Create an availability check

  1. Open the OpenStack CLI.

  2. Create an availability check:

    openstack loadbalancer healthmonitor create \
    --name <name> \
    --delay <delay> \
    --timeout <timeout> \
    --max-retries <max_retries> \
    --max-retries-down <max_retries_down> \
    --type <type> \
    --http-method <http_method> \
    --url-path <url_path> \
    --expected-codes <codes> \
    <pool>

    Specify:

    • <delay> — interval between checks in seconds;

    • <timeout> — response timeout in seconds;

    • <max_retries> — number of consecutive successful requests after which the server is set to operational status;

    • <max_retries_down> — number of consecutive failed requests after which the server operation is suspended;

    • <type> — check type depending on the target group protocol:

      • TCP group — TCP, PING;
      • PROXY group — TLS_HELLO, HTTP, TCP, PING;
      • UDP group — UDP_CONNECT, PING;
      • HTTP group — HTTP, TCP, PING;
    • HTTP request parameters if you selected the HTTP check type:

      • --http-method <http_method> — check method: GET, POST, DELETE, PUT, HEAD, OPTIONS, PATCH, CONNECT, TRACE;
      • --url-path <url_path> — request path without domain name;
      • --expected-codes <codes> — comma-separated expected response codes;
    • <pool> — target group ID or name, can be viewed using the command openstack loadbalancer pool list.

Modify an availability check

  1. In the Control panel, in the top menu, click Products and select Cloud Servers.

  2. Go to Load Balancers → Target Groups tab.

  3. Open the target group page.

  4. Make sure that the Health checks toggle switch is enabled.

  5. If the check type is HTTP, you can change the URL request and expected response codes. To do this, click Edit and enter the new settings.

  6. Optional: open the Advanced rule settings section and specify connection settings:

    • for incoming requests to the load balancer — specify the connection timeout and connection limit;
    • for requests from the load balancer to the servers — specify the connection timeout, inactivity timeout, and TCP packet wait timeout.
  7. Click Save.

Delete an availability check

warning

If you delete an availability check, the load balancer will route traffic to all servers in the target group, including unavailable ones.

  1. Open the OpenStack CLI.

  2. Delete the check:

    openstack loadbalancer healthmonitor delete <health_monitor>

    Specify <health_monitor> — health check ID or name, can be viewed using the command openstack loadbalancer healthmonitor list.