Scale up, not out!

This is a statement I have heard so many times over the years. It has always applied to hardware sizing for me, until now. Citrix has just released a new feature called vertical load balancing, and I like it. Its available in Citrix Virtual Apps and Desktops service.

When working with public clouds its important to only run the workloads that are required. Every penny counts when it comes to cloud, and we want to make sure that we are only paying for what we are using and this is where vertical load balancing comes in.

Picture a scenario where standard user based load balancing is being utilized in a Citrix environment. The users are spread evenly across all available servers, and as time moves on during the day we increase the load until now we have 50 users per VM. Each server begins to drain users at the end of the day, but maybe some people are working later and are not logging off. These servers are now still in use with maybe 1, 2 or 3 users. If those users stay logged on that server must stay active.

Thing to Remember:

  • Vertical Load Balancing works for Server OS’s only
  • Its a site wide setting
  • Its set using powershell
  • A server is deemed FULL when the load evaluator is 10000.

Vertical load balancing will allow for the settings of a maximum threshold or a high watermark. Allowing one server to fill up with users before directing users to the next available server. In this case only the minimum amount of servers are powered on and being used. This is extremely important with public cloud usage.

Configuring Vertical Load Balancing

Login to Citrix cloud using the remote SDK.

In powershell type the following command

asnp citrix*


This image has an empty alt attribute; its file name is lbwindows-powershell-ise.png

Login to Citrix Cloud using your admin credentials

In Powershell type Get-Brokersite.

This is the full command to enable vertical load balancing. As you can see this is a site wide setting.

Set-brokersite -UseVerticalScalingForRdsLaunches $true

This image has an empty alt attribute; its file name is confirm-true.png

Now that the site is configured. Lets look at how we can configure a policy for testing the setting.

Open studio in Citrix Cloud and choose policies.

Load Management Policies are available under the option for load management. For the purposes of testing, I have created a policy that will create a load Index of 10000 after 2 sessions by choosing the option for Maximum number of sessions.

I applied this setting to my test delivery group. Now when two users connect to the delivery group, they should be directed to the same server, and have a load index of 10000 once that is complete. Lets test this by making two connections to the published applications and then check the load index.

In Powershell type the following command.

Get-BrokerMachine |select Dnsname, loadindex

We can see from powershell that the load index is showing as 10000 and the server is now full. Lets look at what happens when a third user connects

The third user is now redirected to the second server in my Delivery Group. Vertical load balancing is now configured and working as expected. Two of my users are directed to server CC-Dub2019 and only when the load index reached 10000 did the third user get redirected to the the second server CC-DubTeams. This is different to the default behavior, where users would be evenly spread across all servers in the delivery group. I can now fill up my first server before redirecting any users to the second server in my delivery group. Now I have a scenario where servers can be powered down faster as users are directed to the busier server that is already in use first, before directing users to the least busy server.

More servers to power off = saving on public cloud costs!

Here are some good articles on the topic.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.