An important aspect of any application is scalability. We need to make sure our applications can scale up and scale in based on the load faced by the application.
Azure helps us with proving the concept of VM scale sets. Once can create scale set, mentioning rules on scaling up or scale in VMs containing our application.
The image above shows that we are setting up a scale set, where we are saying that we want our application to be deployed on a minimum of 1 VM and a maximum of 5 Vms based on the load being handled. The rule we are setting is based on CPU usage, we are mentioning that if the CPU usage is more than 75% for 10 minutes continuously, add one VM. Similarly, when the CPU usage is less than 25%, we will decrease VMs by. Behind a load balancer, VMs will handle the traffic in a distributed manner and scale up or scale in based on the load being handled.