Can I add many servers in bulk?
Short answer
Yes. If more than one row is entered in the Address field of the Load Balancer → Backend Services → Add form, a separate Backend Service is created for each row with the same settings, and the names are given in the Name, Name (2), Name (3) format. If the servers are to share the same settings, all of them are added as rows to the Backends table of a single Backend Group. In WEB-CLI, all the servers of a Backend Group are added in a single command, while individual Backend Services are added with one lb backend add line each. There is no import from a file.
Problem: Adding Dozens of Servers One by One
For a new application farm or a migrated environment, many servers may need to be defined with the same settings (health check, SSL, SNAT…). Filling in the form again for each server both takes time and increases the risk of inconsistency in the settings.
Solution: Three Methods
| Your situation | Suitable method |
|---|---|
| I want each server to be a separate Backend Service (separate maintenance, separate backup) | Method 1: Multi-row Address in the Add form |
| I want the servers to be managed under a single record, with shared settings | Method 2: Backend Group Backends table |
| I want to add them from the command line or with a script | Method 3: WEB-CLI |
Method 1: Multi-Row Address in the Add Form Recommended
- How it works Each row in the Address field becomes a separate Backend Service; all the settings other than the name and the address are copied to each of them.
- Where it is openedLoad Balancer → Backend Services → Add → Address
- Requirement Works only in the add form (in the edit form, Address is a single row)
- vService type HTTP, L7 TCP and Network
Step-by-Step Configuration
In the form opened with Load Balancer → Backend Services → Add, the Backend Service Name (e.g. web), Route Table, Health Check, SSL and Details settings are entered once. If there is no health check profile, it is created with the add button in the Health Check list (How is a Backend Service added; which information is required?).
New IP:Port rows are opened with the add row below the address list, and the IP and port of each server are entered. The rows can be reordered by dragging them by their handle and deleted with the delete control.
The Add button at the bottom of the form is clicked; a Backend Service is created for each row: web, web (2), web (3)…
On the Load Balancer → Load Balancer vService List screen, the vService is selected and Edit is clicked; the created Backend Services are added to the Default Backend Services list.
The Save button at the bottom of the form is clicked. While Clustering is on and Manual Sync Mode is off (default), the records are transferred to the peer device automatically.
Verification
In the Backend Services list, the name is typed in the search box (e.g. web).
web · web (2) · web (3) …Method 2: Backend Group Backends Table
- How it works The servers are the rows of a single Backend Group record; the shared settings are entered once and applied to all the rows.
- Where it is openedLoad Balancer → Backend Groups → Add / Edit → Backends
- Requirement The servers sharing the same settings
- vService type HTTP, L7 TCP and Network
Step-by-Step Configuration
The group form is opened with Load Balancer → Backend Groups → Add; the name and the shared settings are entered.
With the add control next to the Backends label, a row is opened for each server (it comes with port 80); the address, the port and, if needed, Cookie Content, Connection Limit and Weight are entered.
The Add button at the bottom of the form is clicked.
On the Load Balancer → Load Balancer vService List screen, the vService is selected and Edit is clicked; the group is added to the Default Backend Services list as a single item.
The Save button at the bottom of the form is clicked. While Clustering is on and Manual Sync Mode is off (default), the records are transferred to the peer device automatically.
Verification
In the Backend Groups list, the Show Backend Services switch is turned on.
All rows are listed separatelyMethod 3: WEB-CLI
- How it works
lb backend addadds a single Backend Service on each run;lb backend-group add, on the other hand, takes all the servers of a group in a single command. - Where it is opened TR7 WEB-CLI →
lb backend-group addandlb backend add - Requirement WEB-CLI access
- vService type HTTP, L7 TCP and Network
Step-by-Step Configuration
The required fields of the group (name, v-device, namespace) are written without a prefix; Host for v-device and 1 (DEFAULT route table) for namespace are the default values. Then each server is written with --servers.N.addr.ip and --servers.N.addr.port, with the indexes starting from 0 and increasing in order:
lb backend-group add name web-havuzu v-device Host namespace 1 --servers.0.addr.ip 192.0.2.21 --servers.0.addr.port 8080 --servers.1.addr.ip 192.0.2.22 --servers.1.addr.port 8080To add a server to an existing group, first the number of rows is seen with lb backend-group show <id> and the first empty index is used (e.g. if there are two rows, --servers.2.addr.ip and --servers.2.addr.port); if an occupied index is written, no new row is added, and the address of that row changes.
One lb backend add line is written for each server; each line runs as a separate command, and the lines can be pasted one after another:
lb backend add name web-1 v-device Host namespace 1 addr.ip 192.0.2.21 addr.port 8080
lb backend add name web-2 v-device Host namespace 1 addr.ip 192.0.2.22 addr.port 8080Verification
The output of lb backend-group show <id> or lb backend list is checked.
All servers in the recordCommon Mistakes
- Entering the same IP:Port in two rows. The Add form gives the "Elements must be unique" warning; the Backend Group form, however, gives no warning, so the rows must be checked.
- Leaving a row with an empty IP. The form gives the "Required field" warning and the record is not saved; an unused row is deleted.
- Trying to change the address with a bulk update.
update-manyin WEB-CLI changes the shared settings in bulk; the name, address and port cannot be written with this command. - Looking for import from a file. There is no import for Backend Services; Export only exports the table.
How it is done in the documentation
