Skip to main content

Manage availability checks

A target group can have only one availability check.

You can change all parameters of an availability check, except for the check type. If you need to change the check type, you can delete the existing availability check and create a new one with the required type using 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 wait time in seconds;

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

    • <max_retries_down> — number of consecutive failed connections after which 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 the domain name;
      • --expected-codes <codes> — expected response codes separated by commas;
    • <pool> — target group ID or name; you can find it using the openstack loadbalancer pool list command.

Modify an availability check

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

  2. Go to the Load Balancers section → Target Groups tab.

  3. Open the target group page.

  4. Ensure the Availability checks toggle is turned on.

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

  6. Optional: open the Advanced Rule Settings block 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> — availability check ID or name; you can find it using the openstack loadbalancer healthmonitor list`` command.