Running workloads in public clouds offers a lot of benefits that cloud vendors do a good job of marketing. But they come with a potential downside: more expensive operations.
Most organizations are trying to optimize workloads running in the cloud to better manage the cost model offered by cloud providers. With recent Autoscale innovations, Citrix Virtual Apps and Desktops has provided tools that can help organizations achieve the cost balance they want while being able to take advantage of all the cloud has to offer. Vertical load balancing is a new feature in Citrix Virtual Apps and Desktops that can help organizations with costs.
Horizontal Load Balancing
Before we look at vertical load balancing, I want to review the current default load balancing mechanism — horizontal load balancing — in Citrix Virtual Apps and Desktops. In its simplest form, every VDA is assigned a load index. That load index drives the VDA selection process for every incoming user session. It’s a very complex calculation and considers factors like CPU, memory, and concurrency.
In the horizontal load balancing model, the incoming user session is assigned to the least-loaded machine available. Consider this example, which, for the sake of simplicity, assumes the user profiles and tasks within the VDA are similar and have the same impact on the load index. In the below deployment, we have two VDAs. One has an active user session (User 1), and the second user (User 2) is waiting for a session.
![](https://citrixblogs.wpengine.com/wp-content/uploads/2020/01/VLB-1.png)
The horizontal load balancing algorithm will assign User 2 to VDA 2 because of the more favorable load index. The image below shows what happens when User 3 is waiting to be assigned a VDA.
![](https://citrixblogs.wpengine.com/wp-content/uploads/2020/01/VLB-2.png)
Both the VDAs have the same load index, and the session will be assigned to one random VDA (at a system level, this operation is not random). The VDA situation after User 3 is assigned is below.
![](https://citrixblogs.wpengine.com/wp-content/uploads/2020/01/VLB-3.png)
The horizontal algorithm distributes sessions across all available VDAs, which might impede machines being turned off when the load decreases.
Vertical Load Balancing: An Overview
Vertical load balancing flips the logic above and looks to actively assign sessions to the VDAs with the highest load index. This helps consolidate the incoming user sessions to VDAs that are already being used by other users and helps to reduce the number of VDAs that must be powered on and kept ready for user sessions.
Let’s replay the situation from above in the context of vertical load balancing.
![](https://citrixblogs.wpengine.com/wp-content/uploads/2020/01/VLB-4.png)
User 1 is assigned to VDA 1, and the vertical load balancing algorithm is applied to the User 2 session. Because the higher load index is on VDA 1, the incoming User 2 session is assigned to that VDA.
![](https://citrixblogs.wpengine.com/wp-content/uploads/2020/01/VLB-5.png)
Something similar happens when User 3 is also assigned. The final VDA situation after User 3 is assigned is below.
![](https://citrixblogs.wpengine.com/wp-content/uploads/2020/01/VLB-6.png)
With vertical load balancing, all incoming sessions are assigned to the most-loaded VDA until the high load index watermark is met. Only then will the other VDA start receiving sessions.
Load balancing within Citrix Virtual Apps and Desktops is a complex operation, and I highly recommend reading this blog post from William Charnell to understand the inner workings of the operation. It isn’t one size fits all and must be chosen depending on a multitude of factors including the environment specifics, user persona, and work profile.
Vertical load balancing is an exciting new algorithm that’s available to all Citrix Virtual Apps and Desktops service implementations. However, the default load balancing mechanism has not been changed. Customers who want more detail and who want to enable this site-wide feature can read more here.
And Another Thing…
The innovation on the Autoscale front continues with the flexibility to not only power manage but also to create/delete virtual machines dynamically. With this feature, you don’t need to think ahead about spare capacity. Dynamic provisioning can spin up and destroy VMs as per need on the fly. Read more about this new feature here.