Building a 2008 R2 RDS Load Balanced Farm with RD Connection Broker

You just installed additional RD Session Host servers, because of the increase of the remote users. But now you have a problem: what if one of those servers fails, or need maintenance ? you will need to inform the users that there is problem with the server, and until is resolved they can connect to another one to do their work, and send them the address. And again, when the server is up inform the same users that they can connect back using the previous server name. Believe me they are not going to be happy, and neither will you. You can however install the RD Connection Broker role and do load balancing, so every time a server is offline users are automatically redirected to a working one; off course they will lose their connection, but they can resume work once they reconnect. Plus you can configure the Broker server to balance the load on the RD Session Host servers; meaning if a RD Session Host server is small on resources, that server should get fewer connections. Pretty smart, and if you want more information about the RD Connection Broker you can go to this Microsoft website.

For this lab I have two RD Session Host servers and one RD Connection Broker server joined to a Windows domain. Everything runs on Windows Server 2008 R2.

To start we need to add the RD Session Host computers accounts to the Session Broker Computers local group on the RD Connection Broker server. I created a security group where I added my two RD Session Host servers, and then I added this security group to the Session Broker Computers local group; is just my way of working, because I don’t like to just drop a bunch of users or computers on a server’s group.

     

Now we need to configure the RD Session Host servers to join/create the farm. On one of the RD Session Host machines open Remote Desktop Session Host Configuration console from Administrative Tools > Remote Desktop Services and double-click Member of Farm in RD Connection Broker (you can also choose right-click then Properties).

Click the Change Settings button.

On the RD Connection Broker Settings window select the Farm member radio button. Now the bellow boxes are available. In the RD Connection Broker Server name box type the name of your RD Connection Broker server. In the Farm Name box type the name you want for the farm; no spaces.

Back on the Session Host Properties page, check the box Participate in Connection Broker Load-Balancing. This is if you want to balance the load among your RD Session Host servers; and you can give it a relative weight. The smaller the number in the box (Relative weight of this server in the farm) the fewer connections the Session Host server(s) will get. This is great if you have hosts with fewer resources than the other ones in the farm. Make sure you use IP Redirection (Use IP address redirection (recommended)) then in the Select IP addresses to be used for reconnection section, check the box of each IP address that you want to use. Repeat this steps on every RD Session Host server that you want to be part of the farm.

On the Session Host Configuration console a Yes should appear under RD Connection Broker.

Let’s see if our farm was created. On the RD Session Broker server open Remote Desktop Service Manager from Administrative Tools > Remote Desktop Services. Right click the Remote Desktop Service Manager object and choose Import from RD Connection Broker. In the box type the name of your RD Session Broker server and click OK.

     

Now you should see your farm and all the RD Session Host servers members joined to farm.

Is time to configure some DNS entries. A records need to be created for every RD Session Host server IP in the farm. In your DNS server console, right-click your DNS zone name and choose New Host (A or AAA).

In the Name box type the name of your RD Farm, the one you just created. In the IP address box type the IP from one of your RD Session Host servers. Repeat this step for every IP of the RD Session Host servers in the farm, but put the same farm name in the Name box.

     

Now is time to test all this and see if it works. I will use an RDP connection, because right now I don’t have any applications published on those RD Session Host servers. When the client will initiate a remote desktop session to the farm (RDWeb or RDP), the client will perform a DNS lookup and receive an IP address for one of the servers in the farm. When another client connects, the DNS server will cycle through the addresses that are associated with the farm (DNS round-robin), and direct the client to another RD Session Host server, thus load balancing the initial connections to the farm. DNS round-robin is not load balancing it only spread out the initial connections. Once the client makes its connection to an RD Session Host server, the actual Connection Broker load balancing kicks in. When the client is referred to the RDS server via the farm name, the RDS server will query the Connection Broker server to determine how to handle the connection.

From a client open the RD client and type the name of the farm in the Computer box. Click Connect then provide the necessary credentials to connect.

As you can see the first user was redirected to Server-Host1 in my farm. On the second screen I’ve made a connection using another user. He was redirected to the second RD Session Host server. If you want those certificate errors to disappear you need to replace the self-signed certificate on the RD Session Host servers. You can further test this by modifying the weight of the connection on the RD Session Host server(s).

     

Want content like this delivered right to your

email inbox?


27 thoughts on “Building a 2008 R2 RDS Load Balanced Farm with RD Connection Broker

  • 08/06/2016 at 14:29
    Permalink

    When you add a session host to the farm will it automatically pick up the apps that are published on the other session host?

    Reply
    • 08/06/2016 at 14:36
      Permalink

      Nope, it will not. You will have to manually install the applications on the new host in order to work.

      Reply
      • 08/06/2016 at 15:58
        Permalink

        And you still publish the apps from both Session Hosts?

        Reply
        • 13/06/2016 at 07:41
          Permalink

          Nope. All you have to do is publish the app and the RD Broker will automatically balance users between RD Hosts.

          Reply
  • 29/04/2015 at 16:11
    Permalink

    Do you need SQL in order to load balance the connection broker.
    Are there any Caveats using the windows NLB?

    Thanks

    Reply
    • 05/05/2015 at 10:06
      Permalink

      No, you do not need SQL and you can use the Windows NLB, is just that I rather use a dedicated appliance to balance the traffic. Works much better.

      Reply
  • 28/04/2015 at 16:10
    Permalink

    Do you have any information on load balancing the connection broker?

    Reply
    • 29/04/2015 at 09:19
      Permalink

      Hi,
      Well… you could use the Round Robin DNS option but I don’t recommend this. If one of the connection broker hosts fails you will have to manually go and delete its record from DNS then wait for it to replicate. Another way is to use Microsoft Load Balancing feature, but I personally don’t like this one. I recommend you use a dedicated load balancer.

      Reply
  • 16/04/2015 at 22:46
    Permalink

    Do you have any information as to best practices on how may session hosts can belong to one connection broker load balancing farm? For performance purposes mostly.

    Thank you

    Curt

    Reply
    • 21/04/2015 at 08:15
      Permalink

      Hi,
      Unfortunately no. I’ve searched the Microsoft sites but could not find anything about this. I guess you will have to monitor it and see how it works in time.

      Reply
  • 04/09/2014 at 15:23
    Permalink

    Great work and you provide more background Information as on the TechNet, thanks.

    In my testscenario everything is working, except that I do not see any Information regarding on the Connection Broker Computer in “Remote Desktop Connection Manager”. Additionally I do not have the menu entry “Import from RD Connection Broker”. I only have two entries “RD Virtualization Host Servers” and “RemoteApp Sources”.

    Do you have any idea where I made a mistake?

    Thanks
    Thomas

    Reply
    • 06/09/2014 at 10:59
      Permalink

      You need to open Remote Desktop Service Manager console. The option should be there even if no farm is created yet, is by default. Go to Start > Administrative Tools > Remote Desktop Services > Remote Desktop Services Manager. Let me know if you work this out. Cheers.

      Reply
      • 06/09/2014 at 12:08
        Permalink

        Sorry Adrian, I’ve searched in the wrong program. I searched for the Broker Information in Remote Desktop Connection Manager instead of Remote Desktop Services Manager. This was a typical PEBKAC 🙂
        Thank you very much for clarification and your answer!
        Cheers

        Reply
  • 14/08/2013 at 13:05
    Permalink

    Thanks Adrian,

    You said that I still needed to do some farm configuration before people at remote sites can connect to my TS Farm. Can you outline what I need to do next?

    Reply
    • 15/08/2013 at 09:40
      Permalink

      Hi again,

      Well…you will have to open 443 in your firewall, request SSL certificates and install them on the RD Gateway and RD Session Hosts servers. After you do those things your farm should be working, and users should be happy.

      Reply
  • 13/08/2013 at 19:09
    Permalink

    Hi Adrian,

    We actually already have an RD Gateway server up and running. It’s not on the same server that I created that Farm from, I hope that won’t be an issue.
    I’ve spent day’s trying to resolve a problem connecting from a Windows 7 client. I kept seeing this error…“This computer can’t connect to the remote computer. The two computers couldn’t connect in the amount of time allotted.” All the while I could monitor the remote gateway and see other users connecting. I was able to connect without a problem from a Vista client and an XP client. I’m going to use the XP client to test with and just keep the project moving forward.

    I’m ready to start configuring the farm. Thanks in advance for all your help and insights.

    Reply
    • 13/08/2013 at 20:00
      Permalink

      Well actually is recommended to have a separate box for RD Gateway, so you’re doing well. Keep me updated.

      Reply
  • 08/08/2013 at 20:47
    Permalink

    Thank you for the very helpful post.

    My question is about connecting to the farm from outside the LAN. Currently our users will connect to a terminal server using a public IP address that I’ve NAT’ed to a term server. Without an specific IP address for the farm, I can’t connect them that way. How would I go about making the server farm available to people outside our LAN?

    Reply
    • 09/08/2013 at 12:01
      Permalink

      Hi,

      You will need a RD Gateway server, and that way your users will be able to connect from outside securely. I have guide right here how to configure a RD Gateway for external access, but you still have some farm configuration to do after that. Install and configure your gateway server then let me know how are you doing, and I will try to help you the best I can.

      Reply
  • 23/07/2013 at 15:48
    Permalink

    Hello! I have a question. I have two servers, server a is Host Session and Broker, and server b is a Host Session. The name of de farm is ab.x.com when the Server a is Power off the client can connect to farm without problem, but why? I have a RR in the DNS ab.x.com to the servers server a y server b, but the client is resolved to server a, but working fine… why? The RDC is answer?

    Reply
    • 24/07/2013 at 13:25
      Permalink

      Hi,
      Is because of the A records you created in DNS. If you try from a client that has the DNS cache empty it might fail because he will be redirected to the first RD Session Host server, but it might also work because it might be redirected to your second one (round robin in DNS). The farm will work, but without a RD Connection Broker the load can’t be measured. Hope this clears it out for you.

      Reply

Leave a Reply to Shaun Cancel reply

Your email address will not be published. Required fields are marked *

*

css.php