20 June 2011

RDS Load Balanced Farm with RDCB using Windows NLB on physical and Hyper-V

In the article  Building a RDS Load Balanced Farm with a RD Connection Broker I cover how to build and configure an environment using DNS round robin to achieve the load balancing.

Round robin is an effective way to share the load across nodes.  It has one problem though, it is not fault tolerant.  If one of the nodes fail, request may still be directed to a node that is not responsive.  Also adding and removing nodes can only be done at DNS replication speed.   To get away from this limitation you can implement Network Load Balancing.  It has the advantages of detecting if a node has diesdand then only serves from the live nodes.  Machines can also be added and removed form the NLB without needing DNS changes. 

In this article I will step through configuring the Windows Network Load Balancing (NLB) for Hyper-V and physical environments.

This replaces the round robin section of TASK 4 from Building a RDS Load Balanced Farm with a RD Connection Broker

Prepare Hyper-V for NLB
This only needs to be done if you are using a virtualised environement.
Your RDS host machines will be bound in a NLB, this forces the MAC address to be spoofed.  This by default is not enable on Hyper-V

From the Hyper-V Manager

  • Shut down and Power down the RDS host machines.
  • Right Click the RDS VM and select Settings
  • Select the Network adapter
  • Check Enable spoofing of MAC addresses

Prepare Windows Network Load balancing
This needs to be done on every member server that will participate in the NLB

Add additional IPs
If you configure the host with a Unicast NLB you need to add an additional network adapter and assign it another "Management" IP address.  All the NLB IPs must be on the same subnet

You can also use this to manage your RDS since a load balanced farm address will get bounced around.

Install Network Load balancing

From the server manager

  • Click Features
  • Add Feature
  • Add the Network Load Balancing Feature
  • Next to install
  • Close to Finish

Configure NLB Cluster
Once all the nodes have been configured you can create and add to the cluster

Create the cluster

  • Open Administrative Tools
  • Click Network Load Balancing Manager
  • From the File Menu click Cluster
  • New
  • Specify the local host name
  • Connect
  • Select the NLB adapter
  • The dedicated IP address should be the NLB adapter's IP
  • Next
  • Add
  • Specify the IP you want to use for NLB (The virtual IP)
  • Next
  • Specify the FQDN for the NLB IP you created
  • Select Unicast
  • Next
  • Finish

Add Nodes to the cluster
Once the cluster has been created you can now add the additional nodes that you prepared in the steps above
From the Network Load Balancing Manager

  • Expand the Cluster you have created
  • Select the Cluster name
  • Right Click Add Host To Cluster
  • Specify the name of the additional node
  • Connect
  • Select the NLB Interface
  • Accept the dedicated IP address
  • Next
  • Finish

The new node will now be added and once the status is "Converged" the NLB is up and running.

Add DNS record for the NLB IP
Unlike round robin you will now only create a single DNS entry pointing to your NLB virtual IP

To finish up continue with  Building a RDS Load Balanced Farm with a RD Connection Broker.

1 comment:

Anonymous said...

Nice Post, would you be able to point me in the right direction as to why when NAT to the Cluster IP my sessions all go to only 1 RDSH. Inside the LAN Load Balancing works great just from outside it does not. We are using 2 RDSH server with a seperate CB, and one of the RDSH host the Gateway Role

Post a Comment