Manage accessibility checks
У target group there can only be one availability check.
In an accessibility check, you can modify all parameters except the test type. If you want to change the test type, you can remove an existing availability check и create a new with the required type through the Openstack CLI.
Create an availability check
-
Create an accessibility 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>
— the interval between checks in seconds; -
<timeout>
— the time to wait for a response in seconds; -
<max_retries>
— number of consecutive successful accesses, after which the server is brought back online; -
<max_retries_down>
— number of unsuccessful requests in a row, after which the server is suspended; -
<type>
— type of target group protocol dependency check:- TCP group
TCP
,PING
; - the PROXY group —
TLS_HELLO
,HTTP
,TCP
,PING
; - UDP group —
UDP_CONNECT
,PING
; - HTTP group —
HTTP
,TCP
,PING
;
- TCP group
-
HTTP request parameters, if you have selected the validation type
HTTP
:--http-method <http_method>
— method of verification:GET
,POST
,DELETE
,PUT
,HEAD
,OPTIONS
,PATCH
,CONNECT
,TRACE
;--url-path <url_path>
— query path without a domain name;--expected-codes <codes>
— expected response codes, separated by commas;
-
<pool>
— ID or name of the target group, can be viewed withopenstack loadbalancer pool list
-
Change the availability check
Control panel
OpenStack CLI
-
В control panels go to Cloud platform → Balancers.
-
Open the tab Target groups → landing page.
-
Make sure the toggle switch Accessibility checks included.
-
If the validation type is HTTP, you can change the URL invocation and expected response codes by clicking Modify and enter the new settings.
-
Optional: expand unit Advanced rule settings and specify connection settings:
- for incoming requests to the balancer — specify the connection timeout and maximum connections;
- for requests from the balancer to servers — specify the connection timeout, inactivity timeout and TCP packet waiting timeout.
-
Click Save.
-
Change the validation parameters. The test type cannot be changed:
openstack loadbalancer healthmonitor set \
--delay <delay> \
--timeout <timeout> \
--max-retries <max_retries> \
--max-retries-down <max_retries_down> \
--http-method <http_method> \
--url-path <url_path> \
--expected-codes <codes> \
<health_monitor>Specify:
-
<delay>
— the interval between checks in seconds; -
<timeout>
— the time to wait for a response in seconds; -
<max_retries>
— number of consecutive successful accesses, after which the server is brought back online; -
<max_retries_down>
— number of unsuccessful requests in a row, after which the server is suspended; -
HTTP request parameters, if the validation type is
HTTP
:--http-method <http_method>
— method of verification:GET
,POST
,DELETE
,PUT
,HEAD
,OPTIONS
,PATCH
,CONNECT
,TRACE
;--url-path <url_path>
— query path without a domain name;--expected-codes <codes>
— expected response codes, separated by commas;
-
<health_monitor>
— ID or name of the availability check, can be viewed withopenstack loadbalancer healthmonitor list
-
Remove the availability check
If you remove the availability check, the balancer will direct traffic to all servers in the target group, including unavailable servers.
-
Remove the check:
openstack loadbalancer healthmonitor delete <health_monitor>
Specify
<health_monitor>
— ID or name of the availability check, can be viewed withopenstack loadbalancer healthmonitor list