Thursday, 7 May 2015

Introduction to windows azure cloud services

Cloud Service: We can consider cloud service as a box where we can put different roles in it, for example web role, worker role etc.

If we want to give a mathematical representation of a Cloud Service,it will be given as:
                 Cloud service = [ role 1  x2 ,  role 2 x3 , role 3 x1]   ---------------------------       1

where role 1, role 2,role 3 refers to cloud roles in azure and x1, x2, x3 refers to the number of instances of those cloud roles.

Role Instance is a Virtual Machine with a operating system like windows server running on it, a role instance if show mathematically can be represented as follows:

Role Instance = VM + Guest OS + {Service Bits} + {x} ------------------------------- 2
where x is the number of request this instance can handle per second

If we deploy a cloud service represented by equation 1 on cloud then this cloud service will deploy six VMs : 2 instances of role 1, 3 instances of role 2 and 1 instance of role 1
For each instance of same role, the VMs will have same service bits.

Why will we need more instances of our cloud service :

Each role instance has limitation of handling x (see equation 2)  number of request  per second, so in order to handle more requests one thing that we can do is to increase the value of x. This is referred to as scale up which can be done by providing more CPU power and more memory etc. But scaling up has its limitations , on  a hosted environment we have a fixed choices for the maximum limit of scaling a virtual machine.

The other option that we have is to scale out in which we add more instances of virtual machine each of which will have capacity of handling x number of request per second.
Scale out has some advantages over scale up :
  • First we can infinitely scale out 
  • Second we scale out by adding more servers which won't effect present working server 
However multiple instances of VMs need to use a load balancer to ensure that they evenly distribute the incoming requests to the different instances evenly. Also in case when one of the instance goes down the server the other instance will be available and service remains available , in the background azure creates a new instance for the service which has gone down.


No comments:

Post a Comment