Home‎ > ‎VCIX-NV Study Notes‎ > ‎

Section 3.1.1 - Configure and Manage loadbalancing

Configure and manage load balancing

 

The NSX load balancer can operate in 2 modes, One Armed and inline.  These modes mainly revolve around being able to sense the CLIENT IP address by the load balancer.

One armed can also be seen as a proxy mode.   The Client VM sends requests to the Load Balancer VIP – The Load Balancer replaces the Client IP with it’s IP and forwards the requests to a host in the pool.   The host in the pool replies to the LB IP address and then the LB replies to the client with the load balancer VIP.

Inline mode follows a similar process, but preserves the client IP by placing the Load balancer in the IP path as the server’s default gateway.  This is a more complex method because you cannot use logical routers.  The ESG must be the gateway.  But it does allow your application to log the client IP and session information.

 

Configure Load Balancing:

 

The NSX load balancer capable of providing most if the load balancing needs for applications.  If L4-7 serivce are required service insertion can be enabled and configured.

 

1. From the Networking and Secuirty Plugin Select your ESG.  Click on Manage -> Load Balancers

 

I am not using service insertion I checked it to highlight that this is where you would configure it.

1.     Select Enable Load Balancer and Enable Acceleration (If you are not using Service Insertion)

Click OK

 

The load balancing service is now enabled.  Like most things with NSX, that was a pretty simple process.  Next we need to configure service monitors and create server pools.

 

Service Monitors

A service monitor is the method used to determine weather a server is online and ready to receive new sessions.  By Default the basic HTTP/HTTPS and TCP monitors are already created.

 

Server Pools

A Server Pool is a lists of server resources that can handle incoming requests for the application being load balanced.   The pool can also have checks enabled to determine weather a host is alive or not.

When you create a pool you will need to know what load balancing method you will be using.  Here are the types and descriptions

IP_HASH

Selects the server based on the source and destination of each packet

LEAST_CONN

Selects the server with the fewest connections already established

ROUND_ROBIN

Selects servers based on a rotation and the weight assigned to it.

URI

The Left part of the URI (BEFORE the ?) is hashed and divided by the total weight of the running servers.  The result designates the selected server.  This ensures that a URI is always sent to the same server as long as no server goes up or down.

 

With that information in mind, let’s create a pool.

 

1. Click the green PLUS on the POOL menu.   Provide a Name and select an load balancing method.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2.  Click the green ‘+’ to find the object type you wish to load balance on.  What is interesting is the array of types you can select.   If you had a cluster of hosts dedicated to running ONLY yor web servers, you could configure load balancing for every host on that cluster.  You can include a security group or a whole logical switch.

My Example ig using the more traditional route, I am configuring load balancing for a vNIC and a specific VM.

 

 

 

 

 

 

 

 

 

 

 

 

 

3.  Since I selected vNIC, I now need to select the VM that will be in my pool

 

 

4. Now select the vNIC attached to the VM.

 

5.  Now you wil mark the Object as enabled (An active member of the pool)  And what port you are going to be load balancing for.  

 

 

Next we will cover application profiles.

 

 

An Application profile is used to define how a particular type of network traffic behaves.  After you configure an application profile you associate it with a virtual server.  Application profiles are created and managed on the Application profile menu.

 

From the load balancer menu select Application profile and  Click the green ‘+’ to create a new profile.  Fill out the form detailing your application requirements.  IT requires a name,  Select a Type:  TCP, HTTP, HTTPS or UDP.  You can also select a persistace mode and assign any certificates you have decided to offload.  We will cover NSX certificate management later.

 

Adding Virtual servers

 

TA Virtual server is the client facing end point of the load balanced application.

You will need to have the IP address already assigned to the interface you will use.

Virtual servers are configured from the Virtual Server menu.

  1. Enable the Virtual server Acceleration is optional.  Do not use it if you are using service insertion.  Select the App Profile from the drop down menu.

Provide a Name and a port for the Virtual server.

 

 

 

2. Click on the Select IP link.  This will be your VIP for the pool.  You can select the vNIC you configured the IP on.

 

 

3. Click on the default pool menu and select the pool of servers you are configuring.

Click OK.

 

 

And you now should have a working VIP for your new load balancing pool.  In my lab to test my pools I install 2 VMs with Apache & PHP.  I open the phpinfo.html and verify the hostname/IP address changes in the output.

 

I hope this was helpful to you.  Next we will discuss the VPN features of NSX and how to configure them.

 


Comments