Free Security Assessment
Remote Support
Enter your PIN-code to connect with one of our technicians
For more support options Click here

Azure Virtual Desktop Scaling Plans to the rescue

Azure Virtual Desktop Scaling Plans to the rescue

Introduction

One of our clients was spending approximately £2k per month on a Remote Desktop Session Azure virtual machine to support 20–30 concurrent users.

The company’s work is also carried out in shifts 24/7, so there was no possibility of using standard overnight scheduled shutdowns to save costs.

However, night and weekend shifts are covered by only 2–3 users, so this is where a scaling plan comes to the rescue.

Solution

We configured three Windows 11 session hosts and a scaling plan to manage the number of running session hosts, ensuring there are just enough hosts to serve the currently logged-on users.

It starts with just one host in the morning (Ramp-up), which then automatically starts additional hosts once the configured logged-on user capacity threshold is exceeded.

It also automatically shuts down session hosts as the number of users decreases (Ramp-down) in the late afternoon and evening.

What is particularly useful is that even when all session hosts are turned off, if a user attempts to connect, the system will automatically start one of the session hosts.

The scaling plan is very flexible, offering different settings and thresholds for all four stages: Ramp-up, Peak hours, Ramp-down, and Off-peak hours. You can also have different configurations for weekends or even for each weekday.

Below is an example of the settings in JSON format.

{
    "name": "Plan1",
    "properties": {
        "hostPoolType": "Pooled",
        "schedules": [
            {
                "rampUpStartTime": {
                    "hour": 7,
                    "minute": 30
                },
                "peakStartTime": {
                    "hour": 8,
                    "minute": 30
                },
                "rampDownStartTime": {
                    "hour": 19,
                    "minute": 0
                },
                "offPeakStartTime": {
                    "hour": 20,
                    "minute": 0
                },
                "name": "weekdays_schedule",
                "daysOfWeek": [
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday"
                ],
                "rampUpLoadBalancingAlgorithm": "BreadthFirst",
                "rampUpMinimumHostsPct": 20,
                "rampUpCapacityThresholdPct": 20,
                "peakLoadBalancingAlgorithm": "BreadthFirst",
                "rampDownLoadBalancingAlgorithm": "BreadthFirst",
                "rampDownMinimumHostsPct": 0,
                "rampDownCapacityThresholdPct": 90,
                "rampDownForceLogoffUsers": true,
                "rampDownWaitTimeMinutes": 30,
                "rampDownNotificationMessage": "You will be logged off in 30 min. Please make sure to save your work.",
                "rampDownStopHostsWhen": "ZeroSessions",
                "offPeakLoadBalancingAlgorithm": "DepthFirst"
            }
        ],
        "hostPoolReferences": [
            {
            }
        ],
        
    },
}