Manage servers in the target group
Add the server to the target group
Control panel
OpenStack CLI
- In the dashboard, on the top menu, click Products and select Cloud Servers.
- Go to Balancers → Target Groups tab.
- Open the landing page.
- In the Servers block, 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 will accept requests only when the other servers in the group are unavailable, check the Backup checkbox.
- 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 private or public subnet of the server. The list can be viewed with the commandopenstack subnet list
;<server_ip_address>
— private IP address of the server. Can be copied from the control panel: in the top menu click Products → Cloud Servers → Server page → tab Ports → in the port card, click next to the IP address;<port>
— port number;<weight>
— server weight is a proportional measure that denotes the fraction of requests that a server handles. If the weights are the same, then 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 this parameter if you want to make the server redundant so that it accepts requests only when the other servers in the group are unavailable; <pool>
— ID or name of the target group. The list can be viewed with the commandopenstack 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
- In the dashboard, on the top menu, click Products and select Cloud Servers.
- Go to Balancers → Target Groups tab.
- Open the landing page.
- In the Servers block, in the Server row, enable the toggle switch in the Backup column.
-
Make the server redundant:
openstack loadbalancer member set --enable-backup <pool> <member>
Specify:
<pool>
— ID or name of the target group. The list can be viewed with the commandopenstack loadbalancer pool list
;<member>
— Server ID or name. The list can be viewed with the commandopenstack 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 to process traffic as soon as you reactivate it.
Control panel
OpenStack CLI
- In the dashboard, on the top menu, click Products and select Cloud Servers.
- Go to Balancers → Target Groups tab.
- Open the landing page.
- In the Servers block, in the server menu, select Do not accept requests.
-
Suspend the server:
openstack loadbalancer member set --disable <pool> <member>
Specify:
<pool>
— ID or name of the target group. The list can be viewed with the commandopenstack loadbalancer pool list
;<member>
— Server ID or name. The list can be viewed with the commandopenstack loadbalancer member list
.
Resume server operation in the group
Control panel
OpenStack CLI
- In the dashboard, on the top menu, click Products and select Cloud Servers.
- Go to Balancers → Target Groups tab.
- Open the landing page.
- In the Servers block, in the server menu, select Accept Requests.
-
Restart the server:
openstack loadbalancer member set --enable <pool> <member>
Specify:
<pool>
— ID or name of the target group. The list can be viewed with the commandopenstack loadbalancer pool list
;<member>
— Server ID or name. The list can be viewed with the commandopenstack 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
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to Balancers → Target Groups tab.
- Open the landing page.
- In the Servers block, in the server menu, select Remove server from group.
-
Remove the server from the target group:
openstack loadbalancer member delete <pool> <member>
Specify:
<pool>
— ID or name of the target group. The list can be viewed with the commandopenstack loadbalancer pool list
;<member>
— Server ID or name. The list can be viewed with the commandopenstack loadbalancer member list
.