...building hybrid clouds that can support any device from anywhere
Freek Berson a Remote Desktop Services (RDS) MVP developed this concept model on driving a solution for RDS in Azure. The question we ask when discussing this topic with Freek was: What if you wanted to get all the great enhancements to Remote Desktop Services in Windows Server 2012 R2 to securely enable remote users, but could scale up or down to meet changing demand—without having to pay for the excess capacity unless you were using it? Freek has been working on a proof of concept (POC) with one of his customers to accomplish exactly that.
The customer needed a solution to be able to easily scale up the amount of RD Session Host Servers during a specific period of the month, and scale down during the rest of the month to save resources they weren’t using. They also needed this solution to be simple—it shouldn’t matter to the operation of the overall deployment whether it was running at full capacity or not. Adding capacity to a RD Session Host server farm is conceptually simple: if you add more RD Session Host servers to the farm, then the RD Connection Broker will distribute incoming connections based on server load. If the farm is homogenous (the model assumed in RDS) it really doesn’t matter how big it is so long as sufficient capacity exists to meet user demand. In the following diagram you will get a basic layout of what this solution looks like:
Figure 1. Basic infrastructure diagram
There’s a hitch, though: if you scale up and down in the private cloud, you still have to support and host the infrastructure. What if we could use Windows Azure to host the spare RD Session Host server capacity?
Running RDS in Windows Azure might seem like an expensive solution, since his testing show an average maximum of 36 concurrent users running a medium workload on an Extra Large Windows Azure VM. However, one of the advantages of Windows Azure is that you pay for your resources per minute. You don’t pay for VMs that are switched off and deallocated, so hosting spare capacity not only makes the deployment more flexible but could potentially lower costs.
RDS on Azure is a relatively new option. If you’re familiar with his personal blog you’ll know that he’s been doing a lot of testing on this subject since the early days of Windows Azure. These are some of the key developments.
“For the POC I only deployed RD Session Host servers in Windows Azure, because my goal is to create a flexible way to scale RD Session Host server capacity with demand. For simplicity, all the other roles, such RD Connection Broker, RD Web Access to present a common portal for , RD Licensing etc. are still hosted on premises. However, depending on the exact customer demands the location of these roles technically should not matter as long as all servers running these roles can communicate with each other through the Windows Azure VPN.” Freek commented. Using the VPN means that he didn’t need to use an instance of RD Gateway for the servers running in Azure, although if needed, technically you still could
“One of my key goals was flexible scale, and there is no tool in the UI to automatically scale up and down RD Session Host servers in a deployment. However, since RDS in Windows Server 2012 and later is fully manageable using PowerShell I could write a script to detect load, drain users from underutilized servers, and then (once no one was logged in) power down and deallocate the servers so I wouldn’t get charged for them. Because this customer’s demand increases at a predictable time, I could run a second script slightly prior to that time to provision more RD Session Host servers and add them to my deployment.” He said.
The PowerShell scripts takes a few parameters (configurable in a config.ini file):
- The name of the Session Collection
- The name of the Active* RD Connection Broker
- The number of hosts you would like to be available in out-of-office hours
Figure 2. Sample output of the script
A second scheduled task, scheduled to run just before we expect to need full capacity again, runs a PowerShell scripts to check which servers are offline and powers them up. Since the servers were previously set to “drain mode (until reboot)” they will automatically start accepting new sessions again.
Freek said he had three goals for this POC:
1. Automatically scale the size of the farm to meet changing demand
2. Host the spare capacity in Windows Azure so my customer would only pay for the servers when they were in use
3. Securely connect the excess capacity to the main deployment hosted on the customer site, so the user connection experience didn’t change as the farm changed.
This design meets those requirements. However, some questions remain. He will continue and need to test the application performance to make sure it remains consistent; while every application that runs on RD Session Host on premise should run as expected when hosted in Azure, I’ll want to be sure that the end user experience doesn’t change. “Licensing could also be an issue depending on the applications they use. For example, while I can use RDSCALs for the Azure-based RD Session Host servers, it’s not possible to properly license Microsoft Office running on RDS in Windows Azure without having SPLA. I’m sure that will change in the future, but I’m not sure when.” Freek stated in closing.
Running RD Session Host servers in hosted or hybrid environment won’t make sense for everyone—it’s going to depend on the specific use case. And hosting Remote Desktop Services on Windows Azure is still at an early stage. However, given the Microsoft’s emphasis on hosted workloads he is certain it’s just a matter of time until Remote Desktop Services will fully extend to Windows Azure in one form or another.
You can learn more about Freek Berson through any of the following channels:
Interesting topic. I assume you'll be running MS office on the azure-based RDSH. If so, then where will you store the data files, user profiles, GPOs, and email? Do you plan to replicate this data to Azure, or loop it back in real time? I am interested in the monetary cost of bandwidth and the user experience when looping back data, policies, and profiles. I am also curious about the user experience when using Azure CPU speeds relative to typical desktops or high-performance servers optimized for RDSH.