Using Stingray Traffic Manager to load Balance Microsoft RDP with a Session Broker


With the rise of pocket computing, users can access their applications and data from anywhere any time. The only issue with this is that now, there is an expectation that the applications will be available you guessed it any where any time (sheesh!)

But how do we do it? How do we make sure that your critical application or resource is up all of the time: Enter the ADC. These are problems that ADC's are born to solve. ADC's are the best way to keep your application ticking along regardless of outage, change window, administration errors and all the other things that plague your application stack.

Now, a misconception that I come across regularly is that ADC's can only provide value if the application is web based. This, simply put, is not true. In this example, I am going to show you how to make a farm of Microsoft Windows 2008R2 Remote Desktop Services servers highly available with a little more intelligence than using knuckle-headed "Round Robin" DNS, in an environment where direct connections to the servers just aren't possible.

In my example, I built a farm of three Remote Desktop Servers in under an hour in Amazon's Virtual Private Cloud, and front ended it with a Stingray Traffic Manager. Now, the AWS VPC setups and instructions for enabling MS RDS are pretty well documented, so I am not going to go into it here. The magic here lies in Traffic Script being able to parse just about any application protocol and interpret it at the application layer to make smart traffic management decisions.

In this instance, we are parsing the RDS x.224 headers that RDS Session brokers use to instruct an RDS client to connect to a particular RDS server. Traffic script can grab the header and read the important RDC Routing Token like this:

Cookie: msts=2232680714.15629.0000

Now this is a numeric value that, when decoded, will tell the Traffic Manager which back end node to send the traffic to. The Traffic Script in questions is available here:

See? ADC's are *perfectly* placed to keep those applications up 24/7.

Happy Traffic Managing!

4 Responses

  1. Aidan Clarke

    Jul 17, 2014

    If I had to take a guess, I think you might have missed the link in the TrafficScript to the MS guide on setting up the Session Broker. TS Splash post here: that references this document for the Windows side setup: Specifically, you probably want to look at the steps labelled:

    1. TS Session Broker Load Balancing system requirements
    2. Checklist: Deploying TS Session Broker Load Balancing
    3. Install the TS Session Broker role service
    4. Add each terminal server in the farm to the Session Directory Computers local group
    5. Configure TS Session Broker settings for terminal servers in the farm
    6. Configure DNS for TS Session Broker Load Balancing
    Let us know how you go...

  2. Bjarke Emborg Kragelund

    Jul 10, 2014

    I have made a RDP-cluster with 3 Session Hosts ( Windows Server 2012 R2 ) - 1 Session Broker / Licence. Made a pool : ts01.domain.local:3389, ts02.domain.local:3389, ts03.domain.local:3389. Added the 'Named Persistence' and made a VS with 'Client First' on port 3389, hosted on a Traffic IP Gorup on the SteelApp. Basic RDP Load Balancing is working perfect, however we are not reconnecting to existing sessions. Any clues on what / where to begin troubleshooting? Brgds. Bjarke Emborg Kragelund

  3. Paul Wallace

    Jun 23, 2014

    There are some simple "Getting Started" videos for setting up simple load balancing services in AWS - from there, it is straightforward to use Aidan's script for load balancing Microsoft Terminal Services.

    Article: Getting started on AWS:

    Video: Installing on AWS VPC

    Blog: Launch in AWS with 1-click:

    Video: Global Load Balancing on AWS:

    More info on application delivery for AWS:

    - Aidan Clarke/Paul Wallace

Leave a Reply

$mainImageBigHTML ×

Riverbed delivers the most complete platform for Location-Independent Computing, turning location and distance into a competitive advantage. The Riverbed Application Performance Platform™ allows IT to have the flexibility to host applications and data in the most optimal locations while ensuring applications perform as expected, data is always available when needed, and performance issues are detected and fixed before end users notice. At more than $1 billion in annual revenue, Riverbed has 25,000+ customers, including 97% of both the Fortune 100 and the Forbes Global 100.

We need your email to add to briefcase!


Update your Profile!