This template configures vThunder instance as a Server Load Balancer (SLB) to evenly distribute the traffic across the a set of predefined servers and requires manual scaling.
To configure vThunder as an SLB, perform the following steps:
Download A10-vThunder_ADC-CONFIGURATION > BASIC-SLB template from GitHub.
From Start menu, open PowerShell and navigate to this downloaded folder and open the SLB_CONFIG_PARAM.json with a text editor.
NOTE: | Each parameter has a default value mentioned in the parameter file which can be modified as required. |
Configure the following parameters:
Resource Name |
Description |
||||||
---|---|---|---|---|---|---|---|
vThunder instance username |
Specify a 'Read/Write/HM' privilege username. "vThUsername": "admin",
|
||||||
Data Interface Count |
Specify the number of data NICs. The value should be 1 for 2 NICs and 2 for 3 NICs. "dataInterfaceCount": 2, |
||||||
Host IP addresses |
Specify the Public IP address of one or more vThunder instance/s depending on the deployed template. "hostIPAddress": { "vThunderIP": [ "<vThunder1_Public_IP>", "<vThunder2_Public_IP>" ] }, |
||||||
Template HTTP |
Specify the value as 1 if you want to configure the HTTP template. For more information on SLB HTTP template, see Command Line Interface Reference. "templateHTTP": 0,
|
||||||
Template Persist Cookie |
Specify the value as 1 if you want to configure the Persist-Cookie template. For more information on SLB persist cookie template, see Command Line Interface Reference. "templatePersistCookie": 0,
|
||||||
SLB server host or domain |
Specify name and host IP address or domain name of one or more SLB servers. The SLB server host value is the datain NIC's private IP address instance acting as the server. "slbServerHostOrDomain": { "value": [ { "server-name": "s1", "host": "10.0.3.5", "metadata": { "description": "SLB server host/fqdn-name for. To use domain name replace host with fqdn-name and ip address with domain name" } }, { "server-name": "s2", "host": "10.0.3.7", "metadata": { "description": "SLB server host/fqdn-name for. To use domain name replace host with fqdn-name and ip address with domain name" } } ] }, |
||||||
SLB server ports |
Specify the SLB Server ports details. "slbServerPortList": { "value": [ { "port-number": 53, "protocol": "udp", "health-check-disable":0 }, { "port-number": 80, "protocol": "tcp", "health-check-disable":0 }, { "port-number": 443, "protocol": "tcp", "health-check-disable":0 } ] },
|
||||||
Service Group List |
Specify the SLB Service group. "serviceGroupList": { "value": [ { "name":"sg443", "protocol":"tcp", "health-check-disable":0, "member-list": [ { "name":"s1", "port":443 }, { "name":"s2", "port":443 } ] }, { "name":"sg53", "protocol":"udp", "health-check-disable":0, "member-list": [ { "name":"s1", "port":53 }, { "name":"s2", "port":53 } ] }, { "name":"sg80", "protocol":"tcp", "health-check-disable":0, "member-list": [ { "name":"s1", "port":80 }, { "name":"s2", "port":80 } ] } ] },
|
||||||
HTTP Template |
Specify the HTTP template details if "httpList": { "value": [ { "name":"<host-switching-template-name>", "host-switching": [ { "host-switching-type":"contains", "host-match-string":"s1", "host-service-group":"sg80" } ] }, { "name":"<url-switching-template-name>", "url-switching": [ { "url-switching-type":"regex-match", "url-match-string":"s1", "url-service-group":"sg80" } ] } ] }, |
||||||
Persist Cookie Template |
Specify the Persist Cookies template details if "cookieList": { "value": [ { "encrypt-level": 0, "expire": 60, "match-type": 1, "name": "persist-cookie-template-name", "cookie-name": "cookie-template-name", "service-group": 1 } ] }, |
||||||
Virtual Server |
Specify virtual server details. The virtual server default name is “vip”.
If you want to configure an HTTP template ( If you want to configure a Persist-Cookie template ( "virtualServerList": { "virtual-server-name": "vip", "ip-address": "10.0.2.5", "metadata": { "description": "specify ethernet 1 primary private ip address in case of 2nic's or ethernet1 secondary private ip address in case of 3nic's" },
|
To get the vip address after deploying the vThunder instances, perform the following steps:
vth-inst1
.vip
. Here, Datain NIC is vth-inst1-datain
-nic
.Figure 180 : Virtual machine - Networking window - Datain NIC tab
ip-address
value under virtualServerList
with this vip
."virtualServerList": { "virtual-server-name": "vip", "ip-address": "10.0.2.
5
", "metadata": { "description": "virtual server is using VIP from ethernet 1 subnet" },
NOTE: | ha-conn-mirror does not work on port 80 and 443. |
Run the following command to configure the vThunder instance/s as an SLB:
PS C:\Users\TestUser\A10-vThunder_ADC-CONFIGURATION\BASIC-SLB> .\SLB_CONFIG.ps1
Provide password for the vThunder instances/s whose IP address is mentioned in the SLB_CONFIG_PARAM.json file.
If SLB is configured successfully for 2NIC-1VM, the following message is displayed:
Enter Password for x.x.x.x : *********
Configuring vthunder configured ethernet- 1 ip Configured server s1 Configured service group Slb Http Template Created. Slb Persist Cookie Template Created. 0 Configured virtual server Configurations are saved on partition: shared Configured vThunder Instance 1 Session ID closed for x.x.x.x.
------------------------------------------------------------------
The above configuration has one server, an HTTP template, and a Persist-Cookie template configured for 2NIC-1VM.
If SLB is configured successfully for 3NIC-2VM, the following message is displayed:
Enter Password for x.x.x.x : *********
Configuring vthunder configured ethernet- 1 ip configured ethernet- 2 ip Configured server s1
Configured server s2 Configured service group Slb Http Template Created. Slb Persist Cookie Template Created. 0 Configured virtual server Configurations are saved on partition: shared Configured vThunder Instance 1 Session ID closed for x.x.x.x.
------------------------------------------------------------------ Enter Password for x.x.x.x : *********
Configuring vthunder configured ethernet- 1 ip configured ethernet- 2 ip Configured server s1
Configured server s2
Configured service group Slb Http Template Created. Slb Persist Cookie Template Created. 0 Configured virtual server Configurations are saved on partition: shared Configured vThunder Instance 2 Session ID closed for x.x.x.x. ------------------------------------------------------------------
The above configuration has two servers, an HTTP template, and a Persist-Cookie template configured for 3NIC-2VM.