Basic Server Load Balancer

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:

  1. Download A10-vThunder_ADC-CONFIGURATION > BASIC-SLB template from GitHub.

  2. 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.
  3. Configure the following parameters:

    Table 9 : JSON Parameters

    Resource Name

    Description

    vThunder instance username

    Specify a 'Read/Write/HM' privilege username.

        "vThUsername": "admin",
    NOTE: The vThunder instance user should have 'Read/Write/HM' privilege to configure vThunder as an SLB.

    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,
    NOTE: By default, the template HTTP value is 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, 
    NOTE: By default, the template Persist-Cookie value is 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.
    Instead of a host, you can also use a domain name. To do so, replace the key 'host' with 'fqdn-name' and provide a domain name instead of the IP address.

        "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
              }
            ]
          },
    NOTE: For 3NICs, the health-check-disable value is recommended to be 1.

    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
                    }
                  ]
                }
              ]
          },
    NOTE: if you want to configure service groups for each server, the number of members should be equal to the total number of servers. For example, if two servers are added in the parameter file then the members in the member list should also be two, one for server1 and other for server2.
    For 3NICs, the health-check-disable value is recommended to be 1.

    HTTP Template

    Specify the HTTP template details if templateHTTP = 1.

          "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 templatePersistCookie = 1.

          "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”.

    NOTE: The vip address is generated dynamically after deploying the ARM template. Therefore, its default value under virtualServerList should be replaced, see Get VIP address

    If you want to configure an HTTP template (templateHTTP = 1), provide the HTTP template name in the template-http parameter.

    If you want to configure a Persist-Cookie template (templatePersistCookie = 1), provide the Persist-Cookie template name in the template-persist-cookie parameter.

          "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"
            },
    "value": [ { "port-number":53, "protocol":"udp", "ha-conn-mirror":0, "auto":1, "service-group":"sg53" }, { "port-number":80, "protocol":"http", "auto":1, "service-group":"sg80", "template-http":"<host-switching-template-name or url-switching-template-name>", "template-persist-cookie":"<persist-cookie-template-name>" }, { "port-number":443, "protocol":"https", "auto":1, "service-group":"sg443" } ]
    NOTE: Either host-switching-template-name or url-switching-template-name can be used in the template-http.
    For 3NICs, the ha-conn-mirror value is recommended to be 1.
    The ha-conn-mirror does not work on port 80 and 443.
  4. Verify if all the configurations in the SLB_CONFIG_PARAM.json file are correct and save the changes.
  5. 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
  6. 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.

COMPANY INFORMATION: Copyright © 2023 A10 Networks, Inc. All Rights Reserved. Legal Notice