Manage servers in the target group
Add the server to the target group
Control panel
OpenStack CLI
- В control panels go to Cloud platform → Balancers.
- Open the tab Target groups → landing page.
- In the block Servers click Add server.
- Select a server.
- Select an IP address.
- A group port value will be automatically selected for the server — change it if necessary.
- Specify the server weight — this is a proportional measure, denotes the fraction of requests that the server handles. If the weights are the same, the servers serve the same number of requests. If, for example, there is one server in a group with weight "2" and two servers with weight "1", the first server will receive 50% of all requests and the other two will receive 25% each. The maximum weight value is 256.
- If you want to make the server redundant so that it accepts requests only when the other servers in the group are unavailable, check the checkbox Reserve.
- Click .
-
Add the server to the target group:
openstack loadbalancer member create \
--subnet-id <subnet_uuid> \
--address <server_ip_address> \
--protocol-port <port> \
--weight <weight> \
--enable-backup \
<pool>Specify:
<subnet_uuid>
— The ID of the server's private or public subnet. The list can be viewed byopenstack subnet list
;<server_ip_address>
— the private IP address of the server, can be viewed in the control panels under Cloud platform → Servers → server page → tab Ports;<port>
— port number;<weight>
— server weight is a proportional measure that denotes the fraction of requests a server handles. If the weights are the same, the servers serve the same number of requests. For example, if a group has one server with a weight of "2" and two servers with a weight of "1", the first server will receive 50% of all requests and the other two will each receive 25%. The maximum weight value is 256;- optional:
--enable-backup
— Specify the parameter if you want to make the server a standby server so that it accepts requests only when the other servers in the group are unavailable; <pool>
— ID or name of the target group. You can view the list withopenstack loadbalancer pool list
Make a server in a group redundant
A cloud server in the target group can be made redundant — it will be included in the group, but will stop accepting requests as long as at least one server in the group is available. If all servers in the group are unavailable, the standby server will come online.
Control panel
OpenStack CLI
- В control panels go to Cloud platform → Balancers.
- Open the tab Target groups → landing page.
- In the block Servers in the server line, turn on the toggle switch in the column Reserve.
-
Make the server redundant:
openstack loadbalancer member set --enable-backup <pool> <member>
Specify:
<pool>
— ID or name of the target group. You can view the list withopenstack loadbalancer pool list
<member>
— ID or server name. The list can be viewed withopenstack loadbalancer member list
Suspend a server in a group
The server can be suspended when work is performed on the server, for example, when an application is updated or rebooted — the server will temporarily not process requests for this target group. The server itself will continue to work.
There is no need to remove the server from the target group — it will continue processing traffic as soon as you reactivate it.
Control panel
OpenStack CLI
- В control panels go to Cloud platform → Balancers.
- Open the tab Target groups → landing page.
- In the block Servers on the menu of the server select Do not accept requests.
-
Suspend the server:
openstack loadbalancer member set --disable <pool> <member>
Specify:
<pool>
— ID or name of the target group. You can view the list withopenstack loadbalancer pool list
<member>
— ID or server name. The list can be viewed withopenstack loadbalancer member list
Resume server operation in the group
Control panel
OpenStack CLI
- В control panels go to Cloud platform → Balancers.
- Open the tab Target groups → landing page.
- In the block Servers on the menu of the server select Receive requests.
-
Restart the server:
openstack loadbalancer member set --enable <pool> <member>
Specify:
<pool>
— ID or name of the target group. You can view the list withopenstack loadbalancer pool list
<member>
— ID or server name. The list can be viewed withopenstack loadbalancer member list
Remove the server from the target group
If you remove a server from the target group, it will stop accepting requests. The server itself will not be deleted.
Control panel
OpenStack CLI
- В control panels go to Cloud platform → Balancers.
- Open the tab Target groups → landing page.
- In the block Servers on the menu of the server select Remove the server from the group.
-
Remove the server from the target group:
openstack loadbalancer member delete <pool> <member>
Specify:
<pool>
— ID or name of the target group. You can view the list withopenstack loadbalancer pool list
<member>
— ID or server name. The list can be viewed withopenstack loadbalancer member list