You can add a server pool to manage and share backend servers flexibly and efficiently. A pool manages load balancer distribution methods and has a service monitor attached to it for health check parameters.

Procedure

  1. Log in to the vSphere Web Client.
  2. Click Networking & Security and then click NSX Edges.
  3. Double-click an NSX Edge.
  4. Click Manage and then click the Load Balancer tab.
  5. In the left navigation panel, click Pools.
  6. Click the Add (Add icon.) icon.
  7. Type a name and description for the load balancer pool.
  8. Select the algorithm balancing method for each enabled service.

    Option

    Description

    IP-HASH

    Selects a server based on a hash of the source IP address and the total weight of all the running servers.

    Algorithm parameters are disabled for this option.

    LEASTCONN

    Distributes client requests to multiple servers based on the number of connections already on the server.

    New connections are sent to the server with the fewest connections.

    Algorithm parameters are disabled for this option.

    ROUND_ROBIN

    Each server is used in turn according to the weight assigned to it.

    This is the smoothest and fairest algorithm when the server's processing time remains equally distributed.

    Algorithm parameters are disabled for this option.

    URI

    The left part of the URI (before the question mark) is hashed and divided by the total weight of the running servers.

    The result designates which server receives the request. This ensures that a URI is always directed to the same server as long as no server goes up or down.

    The URI algorithm parameter has two options uriLength=<len> and uriDepth=<dep>. The length parameter range should be 1<=len<256. The depth parameter range should be 1<=dep<10.

    Length and depth parameters are followed by a positive integer number. These options can balance servers based on the beginning of the URI only. The length parameter indicates that the algorithm should only consider the defined characters at the beginning of the URI to compute the hash.

    The depth parameter indicates the maximum directory depth to be used to compute the hash. One level is counted for each slash in the request. If both parameters are specified, the evaluation stops when either is reached.

    HTTPHEADER

    HTTP header name is looked up in each HTTP request.

    The header name in parenthesis is not case sensitive which is similar to the ACL 'hdr()' function. If the header is absent or does not contain any value, the round robin algorithm is applied.

    The HTTPHEADER algorithm parameter has one option headerName=<name>. For example, you can use host as the HTTPHEADER algorithm parameter.

    URL

    URL parameter specified in the argument is looked up in the query string of each HTTP GET request.

    If the parameter is followed by an equal sign = and a value, then the value is hashed and divided by the total weight of the running servers. The result designates which server receives the request. This process is used to track user identifiers in requests and ensure that a same user ID is always sent to the same server as long as no server goes up or down.

    If no value or parameter is found, then a round robin algorithm is applied.

    The URL algorithm parameter has one option urlParam=<url>.

  9. (Optional) : Select an existing default or custom monitor from the Monitors drop-down menu.
  10. Add members to the pool.
    1. Click the Add icon (Add icon.).
    2. Enter the name and IP address of the server member or click Select to assign grouping objects.

      The grouping objects can be either vCenter or NSX.

    3. Enter the port where the member is to receive traffic on and the monitor port where the member is to receive health monitor pings.

      Port value should be null if the related virtual server is configured with a port range.

    4. Enter the proportion of traffic this member is to handle in the Weight section.
    5. Enter the maximum number of concurrent connections the member can handle.

      If the incoming requests goes higher than the maximum, they are queued and wait for a connection be released.

    6. Enter the minimum number of concurrent connections a member must always accept.
    7. Click OK.
  11. Check Transparent to make client IP addresses visible to the backend servers.

    If Transparent is not selected (default value), backend servers see the traffic source IP address as a Load balancer internal IP address. If Transparent is selected, source IP address is the real client IP address and NSX Edge must be set as the default gateway to ensure that return packets go through the NSX Edge device.

  12. Click OK.