 
                                Scaling out and in an app means that you increase or decrease the amount of instances that run your application.
For a web app, it means scaling the amount of web app instances up or down.
Let’s see how we can do that automatically.
Here I already have an app service web app.

In that app service, I can go to the scale out menu and scale out and up my app manually.

We will be choosing custom autoscale. This works based on scale conditions. A condition will scale in and out based on rules. Let us see by adding a rule.

Click on add a rule.

Let’s say for now we are choosing data out as the metric. You will see that it will show the data for the last few minutes.

This means that a scale action has been activated when the amount of data flowing out is greater than 70 bytes on an average for the last 10 minutes.

Say when that happens, we want to increase the number of instances by 5. Also, it will not execute the additional scale actions for this same rule for the next five minutes.

Add the rule.

Additionally, you can also configure the instance limits of this scale condition so that it will have a minimum of one instance and a maximum of a specific number.

It will have maximum of 6 instances. So, if something goes wrong, it will fall back on the default number which is 1.

Finally save the settings.

You will see that in the run history here. Right now my app has not scaled up because the users are not using the app right now.

That is it for this demo. Go ahead and try this out yourself.