Let's talk about Azure autoscaling feature. I found often people that are configure autoscaling without understanding what each item from the configuration panel represents.
One of my friends called me a few days ago telling me that the scaling configuration of the App Service that he manages does not work as expected and there might be a bug. It is not common to find such issues on autoscaling capabilities, because of this I suspected from start a miss-configuration.
The reported problem was related to how fast the no. of instances are growing. After reviewing the configuration I notified that the cooldown time period was configured wrong.
Let's start with an example. We have autoscaling configured for a web app that is using Standard App Service Plan. The scaleout is configured with the following configuration:
- When the average CPU level is greater than 70, for more than 40 minutes, increase count with 3
- When the average CPU level is greater than 50, for more than 120 minutes, increase count with 2
- When the average CPU level is less than 20, for more than 60 minutes, decrease count with 1