One of the features of vCloud Networking and Security is the ability to provide load balancing.

This is a great benefit if you do not have a hardware load balancer, do not want to or cannot use Windows NLB, but need to load balance traffic.

 

It can provide load balancing for the following:

  • HTTP
  • HTTPS
  • TCP (specific ports such as 8080, 22 etc)

 

Load balancing methods available are:

  • Round Robin
  • IP Hash
  • Least Connections
  • URI

 

 

 

Before being able to configure load balancing, you must have the following installed and configured:

 

 

1. Login to vCenter server with the vSphere Client

 

2. Click on your datacenter object and select the Network Virtualisation tab

 

3. Select your cluster which you deployed your Edge device to in the previous article vCloud Networking and Security - Deploying a vShield Edge Gateway Device.

 

4. Click Edges and Select your Edge device, choosing actions.

 

5. We need to connect our Edge device to the network to be load balanced after deploying it previously.

Select the next vmnic (vmnic2) and edit it.

 

 

 

 

6. Click "Select" next to "Connected To"

 

 

 

7. Select the portgroup which your virtual machines that require load balancing are connected to.

  

 

 

8. Enter the subnet details for the network we will be load balancing.

 

 

 

9. Check your Edge interface settings (portgroup and subnet) and click Save.

 

 

 

10. Click on the Firewall tab and create a rule to allow the desired traffic through the edge appliance.

I have created a rule to Allow All source/destination (a physical firewall is securing the traffic).

 

 

 

11. Click on the Load Balancer tab.

 

12. Click the Add (+) button to create a load balancing pool.

I will be creating a 2 member load balancing pool for 2 web servers running HTTP on port 80.

 

 

 

 

13. Enter a name for your load balancing pool (e.g. Prod Web Servers)

 

 

 

14. Tick Enabled next to the HTTP service and ensure it is set to port 80 (or your desired service and port).

Choose a load balancing method (I'm using round robin).

 

 

 

15. Enable a Health check for your service and port (e.g. HTTP and port 80).

This is required so that when one of your pool members are unavailable they are taken out of the load balancing pool.

It is possible to specify the interval between checks and thresholds for healthy, unhealthy and timeout values.

Click Next.

 

 

 

16. Next we need to add our pool members.

Click the Add (+) button.

Enter an IP address and a weight value for each member and the port.

 

 

 

17. Once you have all your pool members added click Next.

 

 

 

18. Review your load balancing pool settings (service, port, monitor and balancing method) and Click Finish to create the pool.

 

 

 

19.  We now have our load balancing pool configured with it's members.

 

 

 

20. Under the load balancing tab, select the "Virtual servers" sub section tab.

Click the Add (+) button to create a new load balancing virtual server.

 

 

 

21. Give the load balancing virtual server a name (e.g. Virtual Server Prod Web)

You need to assign an available static IP address in the subnet for your load balancing virtual server.

Enable the services and ports you require to use.

Select a persistence method (e.g. COOKIE) so that it is possible for a user/customer to stay on a single web server member and retain their session.

Otherwise they may get logged out of the website or lose data.

Click Add.

 

 

 

22. You now must to click "Publish Changes" before this load balancing virtual servers (or changes to it) take affect.

 

 

 

23. Finally click the "Enable" button next to "Load Balancer Service Status".

This will enable your load balancing pool and virtual server.

 

 

 

24. You can now test browsing to your load balancing virtual server IP address you configured earlier (rather than the individual member server IPs).

 

I have a test page on each web server (member) which indicates which server I am reaching.

What you should see is because we used the cookie persistence method you get the same server each time. However if you clear your browsers cache you will get the other servers web page come back.

 

Each users/customers accessing the load balanced virtual server will get directed to each member in turn (round robin).

 

 

  

 

 

 

 

  

Share this blog post on social media:

Social Links

Disclaimer

All advice, installation/configuration how to guides, troubleshooting and other information on this website are provided as-is with no warranty or guarantee. Whilst the information provided is correct to the best of my knowledge, I am not reponsible for any issues that may arise using this information, and you do so at your own risk. As always before performing anything; check, double check, test and always ensure you have a backup.

Copyright ©2008-2021 Andy Barnes - Please do not copy any content including images without prior consent!

Designed and Hosted by Andy Barnes

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.