Configure Load Balancing

The NSX Advanced Networking load balancer enables network traffic to follow multiple paths to a specific destination. It distributes incoming service requests evenly among multiple servers in such a way that the load distribution is transparent to users. With the NSX Edge Gateway Load balancing you can achieving optimal resource utilization, maximizing throughput, minimizing response time, and avoiding overload. The NSX Edge provides load balancing up to Layer 7.

Below are details on how to use load balancing on your NSX Advanced Networking Edge. 

Introduction to Load Balancing Configuration

You can map an external, or public, IP address to a set of internal servers for load balancing. The load balancer accepts TCP, HTTP, or HTTPS requests on the external IP address and decides which internal server to use.

The NSX Edge load balancer distributes network traffic across multiple servers to achieve optimal resource utilization. You create an application profile to define the behavior of a particular type of network traffic. Next, you create a service monitor to define health check parameters for the load balancer. You now create a server pool consisting of backend server members and associate a service monitor with the pool to manage and share the backend servers flexibly and efficiently. When the virtual server receives a request, it chooses the appropriate pool to distribute the traffic comprising one or more members based on the associated algorithm. Each pool is monitored by the associated service monitor. When the load balancer detects a problem with a pool member, it is marked as down.

Clicking on the Load Balancer Tab of your vDC you will see the options listed below:

  1. The Load Balancer Tab
  2. Button to Enable/Disable the Load Balancer (default is disabled)
  3. Action Buttons used to Save Config, Revert Changes and Launch this Help

 


Enabling the Load Balancer

  • On the Load Balancer Tab Click the Enable Button to On and then Click on Save Config

 


Overview of Load Balancer Configuration Tabs

  • Once enabled the Configuration Tabs will appear from which you configure the details required to get the Load Balancing function working for your  service workload.
    1. Pools: 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
    2. Application Profiles: You create an application profile to define the behavior of a particular type of network traffic. After configuring a profile, you associate the profile with a virtual server. The virtual server then processes traffic according to the values specified in the profile. Using profiles enhances your control over managing network traffic, and makes traffic-management tasks easier and more efficient.
    3. Application Rules: You can write an application rule to directly manipulate and manage IP application traffic
    4. Monitors: You create a service monitor to define health check parameters for a particular type of network traffic. When you associate a service monitor with a pool, the pool members are monitored according to the service monitor parameters
    5. Virtual Servers: Add an NSX Edge internal or Uplink interface to act as the virtual server for the Load Balances Service

Load Balancer Tab Details

Pools Tab

Shows an overview of the selected Network Interface and lets you configure and/or edit the Network as selected from the Drop Down.

  • To create a new Load Balancer Pool Click on the Add Pool Button
  • In the Add/Edit Pool Window you are presented with the following options
  • Once the Pool has been added click on the Add Member Button to add the VMs that will be part of this Load Balancer Pool
  • In the Add/Edit Member Window enter in the Member Name, IP Address, Port Number of the service wanting to be load balanced, the weighting and optional Min/Max Connections per Member as well as the Monitor Port
  • Once the Member has been added you will see it listed as shown below
  • You can add Multiple Members to the Pool and each member will be listed along with their configuration details and status.
  • To Commit the configuration click on the Save Config Button

Application Profiles Tab

Shows an overview of the selected Network Interface and lets you configure and/or edit the Network as selected from the Drop Down.

  • To create a new Load Balancer Application Profile Click on the Add Profile Button
  • In the Add/Edit Application Profiles Window you are presented with the following options
  • Depending on what Application Template you Choose you are presented with different options that dynamically change within the configuration window. The above is an example of a basic web application listening on HTTP Port 80.
    • Name: Name of the Application
    • Template:
      • HTTP
      • HTTP
      • TCP
      • UDP
    • HTTP Redirect To: If HTTP/HTTPS are selected you can enter in a URL to force a client to redirect to if they hit the Load Balanced Virtual Server.
    • Insert X-Forwarded-For
    • SSL Passthrough
    • SSL Server Enabled (Hidden)
    • Persistence Method: Persistence tracks and stores session data, such as the specific pool member that serviced a client request. This ensures that client requests are directed to the same pool member throughout the life of a session or during subsequent sessions

      Traffic Type

      Persistence Method Supported

      TCP

      SOURCEIP, MSRDP

      HTTP

      Cookie, SOURCEIP

      HTTPS

      Cookie, ssl_session_id (SSL Passthrough enabled) , SOURCEIP

      UDP

      SOURCEIP

    • To Commit the configuration click on the Save Config Button

Application Rules Tab

An application profile allows you to specify HTTP/HTTPS redirection, which always redirects traffic regardless of the request URLs. You also have the flexibility to specify the conditions in which HTTP/HTTPS traffic should be redirected.

  • To create a new Application Rule Pool Click on the Add Application Rule Button.
  • Note: Application Rules can be complex and should be used by those who have an undersanding of what adding Application Rule can do. For an overview click here. Application Profiles are based on HAProxy Rules?for a more in depth Application Rule Syntax and configuration break down, click here
  • In the Add/Edit Application Pool Window you are presented with the following options to enter in.
  • Click on the Save Button to Save the Application Rule. You will see the rule in listed in it?s entirity below once the save operation have completed.
  • To Commit the configuration click on the Save Config Button

Monitors Tab

You create a service monitor to define health check parameters for a particular type of network traffic. When you associate a service monitor with a pool, the pool members are monitored according to the service monitor parameters.

  • To view/edit the default Monitors and/or create a new Monitor click on the Add Application Rule Button
  • There are three Default Monitors that are configured by default.TCP: For Basic TCP Service Monitoring
  • HTTP: For Basic HTTP Service Monitoring
  • HTTPS: For Basic HTTPS Service Monitoring
  • To Create a new Monitor click on the Add/Edit Monitor button.There are a number of default values common to all Type (protocols). When you select the Type the configuration items will change to suit. HTTP/HTTPS monitors allow you to add additional check against the application being monitored. Type the interval at which a server is to be pinged, type the maximum time in seconds within which a response from the server must be received, type the number of times the server must be pinged before it is declared down. Select the way in which you want to send the health check request to the server?once selected you can choose from a number of web methods from which to configure the monitor
  • Extensions are monitor parameters that can be used to customize monitors with advanced options. A list of supported extensions supported by each protocol can be found here:
  • Once the new Monitor has been configured, hit the Save Button and then click on the Save Config to commit the change.

Virtual Servers Tab

Shows an overview of the selected Network Interface and lets you configure and/or edit the Network as selected from the Drop Down.

  • To create a new Virtual Server click on the Add Server Button
  • The Add/Edit Virtual Server windows should be populated with the previously configured item such as Pool, Application Profile and any Application Rules if they have been configured
  • Enter in the Virtual Server details as shown below
    • You need to know the IP Address of the Interface (generally a public Uplink IP) and the Port of the Application you are load balancing.
    • Select the Protocol (HTTP, HTTPS or TCP)
    • Select the Application Profile from the drop down list
    • If Application Rules are present you can select/deselect them by holding down CTRL or the Mac Command Key (Rules will be in play if they are highlighted)
    • Select the Default Pool from the drop down list
    • You can optionally set the Connection and Connection Rate Limit
    • Once the new Virtual Server has been configured, hit the Save Button and then click on the Save Config to commit the change

Once you have gone through and configured through the above your application should be available from the IP Address configured in the Virtual Server Tab.