Virtual Machines Scalability – Azure (IaaS) part 3

If you have been working with Microsoft
Azure
infrastructure now and have been through the different parts of Azure
Infrastructure pervious blog posts, you will understand that once you
create a Virtual Machine
or more in the same Cloud Service and assign them
to the same
availability set
, you will be able to scale them based on your needs.

Now there is 2 ways to scale your application, whether by
scaling up or down the VM holding your workload or the second option is through
scaling out or in, the number of VMs or the number of instances holding your
workload.  Which one is the best for
you?  Actually the size of the Virtual Machine is more related to what workload is running on the Virtual Machine as for the number of instances is more related to the number of the concurrent users that will be using the workload.

So for the first option, if you want to increase the size of
the Virtual Machine or decrease it at any time you can easily do it manually
whether through the Microsoft Azure portal or using Azure PowerShell
commands.  To do it through the portal,
just go to your virtual machine configuration and there you will find the size
of the virtual machine.  There might be
some limitation on the size of the virtual machine, I mean once you create one
with a specific size, like for example a Virtual machine using the A
series.  The virtual machine will be
created in a cluster that support the A series, so when you scale the virtual
machine later on, you will only find the sizes of the series chosen at the
beginning.  For example if you started
with the A2 virtual machine size, you can scale up to A7 or scale down to A0
Virtual machine.  If you need to scale it
to another virtual machines size series, you will have to turn off the virtual
machine and recreate it again from the beginning but this time you will have
all sizes available at creation for your choice.

For the second option
the scaling out or in the number of existing instances, this can be done
through the Cloud Service of the workload. 
For more information about the Cloud Services you can find it here.  The scalability with the Cloud Service can be
done automatically unlike defining the Virtual Machine size, it is like rules
you put for the Virtual Machine CPU consumption and once it reach this level of
processing power it creates another Virtual Machines with the same workload for
you to maintain the availability of your application with the increasing
incoming users traffic.  Now there is few
things that you must do to obtain this scalability, the first thing is to have
at least 2 Virtual machines with the same workload and the same VM size up and
running, the second thing is that they must be in the same availability set.  The following snapshot is from the Cloud
Service Scale tab, where you can see all the availability sets for your
workload, and you can define the scaling metric and its associated rules.    

 

After changing the configuration, don’t forget to press the
save button J