Server Autoscale


Server autoscale dynamically scales a server pool, by adding new pool members (scaling out) or removing them (scaling in).This article explains the steps to configure server autoscale via the Avi UI.

Creating an AutoScale Policy

An existing pool can be edited to create autoscale policy. Alternatively, autoscale policy can also be created during pool creation also.

To create autoscale policy by editing an existing pool:

  1. Click on the edit icon to open the Edit Pool screen. edit pool
  2. Navigate to Profiles/Policies tab and click on the AutoScale Policy drop-down menu.
  3. Click on the Create AutoScale Policy button to open the New AutoScale Policy screen.
  4. You can also create autoscale policy by navigating to Templates > AutoScale > Server AutoScale. Click on the edit icon to open the Edit Pool screen.
    create autoscale policy
  5. Specify the name of autoscale policy.
  6. Set the minimum and maximum number of servers (Instances) allowed in the pool.
  7. Select Intelligent (Machine Learning) to select Avi Vantage’s intelligent machine learning algorithm that bases autoscaling decisions on a comparison of the load on the pool and the estimated capacity of member servers. Note: On enabling the option Intelligent (Machine Learning), the option Use Predicted Load is visible. Select this option to make use of predicted load instead of current load.
  8. Set the Scale Out and Scale In parameters as follows:

    • Select the type of Alerts that will trigger a scale out or a scale in.
    • Select the minimum amount of time between two consecutive scale outs or scale ins as the Cooldown Period.
    • Set the number of server instances to add or remove with each scale out or scale in operation as the Adjustment Step.
    • Note: The adjustment step should not exceed the minimum or maximum number of allowed server instances.
    • Select the minimum extra capacity as percentage of load used by the intelligent machine learning algorithm. Scale out is triggered when available capacity falls below this margin.

  9. You can set the schedule for autoscale policy in the Scheduler tab. new autoscale policy You can set the start and end date in the UTC time zone format, duration and the frequency. You can set the frequency by selecting either Schedule Picker or Cron Expression option.
  10. Specify the desired capacity and the maximum step during the schedule.
  11. Click on Save.

The autoscale policy with the defined configurations is created and attached to the pool.

Scheduled scaling for Autoscale

Autoscaling application servers in public cloud is a popular design choice to provide elastic, on-demand scale for the applications while keeping resource costs in check. For more information on autoscaling in public clouds, see Autoscaling.

As mentioned above, Avi Vantage provides autoscaling capability based on metrics such as application load, connections, etc.

The scheduled scaling feature, introduced in 21.1.3, complement the autoscaling capabilities to provide a deterministic capacity during a specified period of time.

Use Case

Scheduled autoscaling allows you to create a policy for a duration, for instance, 2 months, during which, your application capacity can be maintained at a specified state, overriding the metrics based autoscaling.

The feature provides deterministic capacity at these time periods so that the application servers are already provisioned and ready for traffic, rather than wait for metrics based autoscaling to kick in. This reduces the lead time for application capacity to be available.


An e-commerce provider uses autoscaling policies already to scale up/ down application servers based on incoming traffic (connections per second).

During holiday shopping season between November through January, the company sees high capacity from afternoon to midnight.

By creating a scheduled autoscaling policy the company can keep the application capacity at a high value, thus ensuring their application response times are optimum, and there is no delay in servicing the added load.


Scheduled autoscaling is configured within the existing Server AutoScale Policy, and attached to pool.

The scheduled_scalings configuration has the following sub-parameters:

Parameter Values Notes
enable True/ False Configure this to True to enable scheduled scaling.
desired_capacity Value up to 1000 Desired number of servers during the scheduled time interval.
This could result in scale in or scale out depending on the value entered.
cron_expression Cron-like expression should be within the start_date and end_date. Supports a fixed integer for minutes and hours. A cron-like expression at which time the policy is activated for autoscaling_duration hours.
start_date Date and Time in ISO8601 format. Date and Time in ISO8601 format.
end_date Date and Time in ISO8601 format. End date and time for scheduled autoscaling.
autoscaling_duration Integer, hours The duration in hours after cron criteria is met, for which the desired capacity will be maintained.
schedule_max_step Integer The number of servers to simultaneously scale. Helps in faster provisioning. The autoscale policy’s scaleout_cooldown parameter is used as cooldown duration between successive scale-out events.


In the below configuration,

  • The policy is active between 1st October 2021 and 1st February 2022 (based on start_date and end_date).

  • The scheduled scaling should happen every day at 9:10 AM (based on cron_expression).

  • The capacity should be maintained at 50 servers (desired_capacity).

  • The ramp-up should happen in steps of 5 (schedule_max_step).

  • The ramp-up should be maintained for 2 hours (autoscaling_duration).

configure serverautoscalepolicy asp-example 

scheduled_scalings autoscaling_duration 2 

index 1 #index assignment should happen after at least on other field 

enable  #no enable if we want to disable 

desired_capacity 50  

schedule_max_step 5  

start_date 20211001T000000Z #timezone should be UTC 

end_date 20220201T000000Z  

cron_expression '10 9 * * *'  

save (save scheduled_scalings) 

save (save auto scale policy) 


| Field                               | Value                                 | 


| uuid                                | serverautoscalepolicy-69ce3c2d-b401-4b9a-a834-08fbec8921d9                   | 

| name                                | asp-example                                                                                                           | 

| intelligent_autoscale               | False                                                                                                                 | 

| intelligent_scaleout_margin         | 20                                                                                                                    | 

| intelligent_scalein_margin          | 40                                                                                                                    | 

| max_scaleout_adjustment_step        | 1                                                                                                                     | 

| max_scalein_adjustment_step         | 1                                                                                                                     | 

| scaleout_cooldown                   | 300 sec                                                                                                               | 

| scalein_cooldown                    | 300 sec                                                                                                               | 

| use_predicted_load                  | False                                                                                                                 | 

| delay_for_server_garbage_collection | 0                                                                                                                     | 

| scheduled_scalings[1]               |                                                                                                                       | 

|           enable                    | True                                                                                                                  | 

|           desired_capacity          | 50                                                                                                                    | 

|           cron_expression           | 10 9 * * *                                                                                                           | 

|           start_date                | 20211001T000000Z                                                                                                      | 

|           end_date                  | 20220201T000000Z                                                                                                      | 

|           autoscaling_duration      | 2 hours                                                                                                               | 

|           schedule_max_step         | 5                                                                                                                     | 

| tenant_ref                          | admin                                                                                                                 | 



  • Only one scheduled_scaling configuration is supported for each autoscale policy.

  • If scheduled_scaling is disabled, the other fields such as max_size, min_size, max_scaleout_adjustement_step, max_scalein_adjustment_step, desired_capacity and schedule_max_step will start to control the pool server size.

Document Revision History

Date Change Summary
December 20, 2021 Added Scheduled scaling for Autoscale details for 21.1.3
July 15, 2022 Edited screenshots for Autoscale details for 22.1.1