Hello Fawad Rafi,
Greetings! Welcome to Microsoft Q&A Forum.
We can enable autoscaling on an existing pool and update it with new containers If automatic scaling of the Pool is already enabled, you may specify a new autoscaling formula and/or a new evaluation interval. You cannot call this API for the same Pool more than once every 30 seconds refer - https://learn.microsoft.com/en-us/cli/azure/batch/pool/autoscale?view=azure-cli-latest#az-batch-pool-autoscale-enable
Each Batch SDK provides a way to enable automatic scaling. For example:
- BatchClient.PoolOperations.EnableAutoScaleAsync (Batch .NET)
- Enable automatic scaling on a pool (REST API)
When you enable autoscaling on an existing pool, keep in mind:
- If autoscaling is currently disabled on the pool, you must specify a valid autoscale formula when you issue the request. You can optionally specify an automatic scaling interval. If you don't specify an interval, the default value of 15 minutes is used.
- If autoscaling is currently enabled on the pool, you can specify a new formula, a new interval, or both. You must specify at least one of these properties.
- If you specify a new automatic scaling interval, the existing schedule is stopped and a new schedule is started. The new schedule's start time is the time at which the request to enable autoscaling was issued.
- If you omit either the autoscale formula or interval, the Batch service continues to use the current value of that setting.
- If you specify a new automatic scaling interval, the existing schedule is stopped and a new schedule is started. The new schedule's start time is the time at which the request to enable autoscaling was issued.
Note: If you specified values for the targetDedicatedNodes or targetLowPriorityNodes parameters of the CreatePool
method when you created the pool in .NET, or for the comparable parameters in another language, then those values are ignored when the autoscale formula is evaluated.
refer https://learn.microsoft.com/en-us/azure/batch/nodes-and-pools#automatic-scaling-policy
Hope this information helps! if yes please convert and accept as answer else, please let us know if you have any further queries. I’m happy to assist you further.