Get started with Autoscale
Autoscale works at a delivery group level. It proactively power manages machines in a delivery group based on the schedules that you set.
Autoscale applies to all types of delivery groups:
- Single-session static OS
- Single-session random OS
- Multi-session random OS
This article describes basic Autoscale-related concepts and provides guidance on how to enable and configure Autoscale for a delivery group.
Before you start, learn about the following basic concepts in Autoscale:
Autoscale powers on and off machines in a delivery group based on a schedule that you set.
A schedule includes the number of active machines for each time slot, with peak and off-peak times defined.
Schedule settings vary with the type of delivery group. For more information, see:
- Multi-session OS delivery groups
- Single-session OS random delivery groups
- Single-session OS static delivery groups
Capacity buffer is used to add spare capacity to the current demand to account for dynamic load increases. There are two scenarios to be aware of:
- For multi-session OS delivery groups, the capacity buffer is defined as a percentage of the total capacity of the delivery group in terms of load index.
- For single-session OS delivery groups, the capacity buffer is defined as a percentage of the total number of machines in the delivery group.
Load index applies only to multi-session delivery groups.
The load index metric determines how likely a machine is to receive user logon requests. It’s calculated using the Citrix Load Management policy settings configured for concurrent logon, session, CPU, disk, and memory use.
The load index ranges from 0 to 10,000. By default, a machine is considered at full load when it’s hosting 250 sessions:
The digit “0” indicates an unloaded machine. A machine with a load index value of 0 is at a baseline load.
The digit “10,000” indicates a fully loaded machine that can’t run any more sessions.
Enable Autoscale for a delivery group
Autoscale is disabled by default when you create a delivery group. To enable and configure Autoscale for a delivery group using the Full Configuration interface, follow these steps:
You can also use PowerShell commands to enable and configure Autoscale for a delivery group. For more information, see Broker PowerShell SDK commands.
From Manage > Full Configuration, select Delivery Groups in the left pane.
Select the delivery group that you want to manage and then click Manage Autoscale.
On the Manage Autoscale page, select the Enable Autoscale check box to enable Autoscale. After you enable Autoscale, the options on the page are enabled.
To change the default settings based on your organization’s needs, complete the following settings:
To disable Autoscale, clear the Autoscale check box. The options on the page turn gray to indicate that Autoscale is disabled for the selected delivery group.
- If you disable Autoscale, all machines managed by Autoscale remain in their states at the time of disabling.
- After you disable Autoscale, the machines in drain state are taken out of drain state. For more information about drain state, see Drain state.
You can dynamically provision machines for the group using a PowerShell script. For more information, see Dynamic machine provisioning.
After you enable Autoscale for a delivery group, you can monitor the following metrics of Autoscale-managed machines from the Monitor tab.
Alert notifications for machines and sessions
Load evaluation trends
When you initially enable Autoscale for a delivery group, it might take a few minutes to display monitoring data for that delivery group. Monitoring data remains available if Autoscale is enabled and then disabled for the delivery group. Autoscale collects monitoring data at 5-minute intervals.
For more information about the metrics, see Monitor Autoscale-managed machines.
Good to know
Autoscale works at a delivery group level. It’s configured on a per-delivery group basis. It power manages only the machines in the selected delivery group.
Autoscale includes only machines that are registered with the site when determining the capacity. Powered-on machines that are unregistered can’t accept session requests. As a result, they aren’t included in the overall capacity of the delivery group.
In some sites, multiple machine catalogs might be associated with a single delivery group. Autoscale randomly powers on machines from each catalog to meet schedule or session demand requirements.
For example, a delivery group has two machine catalogs: Catalog A has three machines powered on and Catalog B has one machine powered on. If Autoscale needs to power on an extra machine, it might power on a machine from either Catalog A or Catalog B.
The machine catalog associated with the delivery group must have enough machines to power on and off as demand increases and decreases. If session demand exceeds the total number of registered machines in the delivery group, Autoscale ensures that all registered machines are powered on. However, Autoscale does not provision additional machines.
To overcome this bottleneck, you can use a PowerShell script to create machines and delete them dynamically. For more information, see Dynamically provision machines
You can optimize your costs if you appropriately size your instances in public clouds. We recommend that you provision smaller instances as long as they match your workload performance and capacity requirements.
Smaller instances host fewer user sessions than larger instances. Therefore, Autoscale puts machines into drain state much faster because it takes less time for the last user session to be logged off. As a result, Autoscale powers off smaller instances sooner, thereby reducing costs.
Autoscale attempts to scale down the number of powered-on machines in the delivery group to the configured pool size and capacity buffer.
To achieve this goal, Autoscale puts the excess machines with the fewest sessions into “drain state” and powers them off when all sessions are logged off. This behavior occurs when session demand lessens and the schedule requires fewer machines than are powered on.
Autoscale puts excess machines into “drain state” one by one:
If two or more machines have the same number of active sessions, Autoscale drains the machine that has been powered on for the specified power-off delay.
Doing so avoids putting recently powered-on machines into drain state because those machines are more likely to have the fewest sessions.
If two or more machines have been powered on for the specified power-off delay, Autoscale drains those machines one by one at random.
Machines in drain state no longer host new session launches and are waiting for the existing sessions to be logged off. A machine becomes a candidate for shutdown only when all sessions are logged off. However, if there are no machines immediately available for session launches, Autoscale prefers directing the session launches to a machine in drain state over powering on a machine.
A machine is taken out of drain state when one of the following conditions is met:
- The machine is powered off.
- Autoscale is disabled for the delivery group to which the machine belongs.
- Autoscale uses the machine to meet schedule or load demand requirements. This case occurs when the schedule (schedule-based scaling) or the current demand (load-based scaling) requires more machines than the number of machines that are currently powered on.
If no machines are immediately available for session launches, Autoscale prefers directing session launches to a machine in drain state over powering on a machine. A machine in drain state that hosts a session launch remains in drain state.
To find out which machines are in drain state, use the
Get-BrokerMachine PowerShell command. For example:
Get-BrokerMachine -DrainingUntilShutdown $true. Alternatively, you can use the Manage console. See Display machines in drain state.
This feature applies only to multi-session machines.
In Manage > Full Configuration, you can display machines that are in drain state, letting you know which machines are about to shut down. Complete the following steps:
- Navigate to the Search node and then click Columns to Display.
- In the Columns to Display window, select the check box next to Drain State.
- Click Save to exit the Columns to Display window.
The Drain State column can display the following information:
- Draining until shutdown. Appears when machines are in drain state until they’re shut down.
- Not draining. Appears when machines aren’t yet in drain state.
For more information on Autoscale, see Citrix Autoscale in Tech Zone.