Monday, November 11, 2013

Windows Azure architecture and workflow

So,you just need your .cspkg and .cscfg file to do a deployment to Azure. When the deployment is complete, the instances are spinned up, application is up and running and during the whole process you didn't have to move a finger!!! That is what we call PAAS magic. But what actually happens in the background, lets find out..

Red Dog Front End(RDFE) : When you interact with the Azure platform through management portal or Visual Studio, you are actually talking to the API called RDFE .The request are passed on by the RDFE to Fabric Front end(FFE) layer

Fabric Front End(FFE): It receives the request from RDFE and  converts them to Azure fabric commands which are then passed on to what we call Azure Fabric Controller. FFE decides on the location of the VM based on inputs such as affinity group and Geo Location, and also based on the Fabric inputs such as machine availability

Azure Fabric controller: This is considered to be the kernel of the Cloud OS, simply because it manages all the resources in the datacenter. Fabric controller is responsible for the provisioning and managing the  VMs, their underlying hosts,deploying applications, monitoring the health of the services and  redeploy them if required.

 As we all know, Azure uses Hyper V based Virtualization. The architecture of Hyper V uses the concept of  root partition(aka host machine) and Child partition(aka Guest VMs). When the fabric controller builds a root partition ie host in the data center, it installs an agent called 'Host Agent' in these root partitions. Each of the Guest VMs will have a Guest agent installed in them, known as 'WindowsAzureGuestAgent'. Another agent "WaAppAgent" is actually responsible for the installation, configuration and update of the WindowsAzureGuestAgent. This means that your guest agent update is decoupled from the Guest OS upgrades. The "HostAgent" does communicates with the WaAppAgent to do guest OS hearbeat checks and also gives instructions to bring a role to its goal state. If the hearbeat is not received for 10 minutes, the guest OS will be restarted.

 In a role instance, WaAppAgent is listed as "RdAgent" in windows service list

 WindowsAzureGuestAgent:

 WindowsAzureGuestAgent has the following functions:

 - Guest OS level configurations , such as firewalls, ACls, certificates, configuring as per service package file etc
 - Communicates the role status to the Fabric controller
 - Set up SID for the user which the role will be using
 - Starts the waHostBootStrapper application

 If you login to a role instance, you can see this listed as a service "Windows Azure Guest Agent"

 WaHostBootstrapper:

 - It is responsible for starting all appropriate tasks and processes in the role as per the role configuration file
 - This service also monitors the child processes and raise staticheck event on the role host process
 - Executes the simple startup tasks
 -depending on the role type, it will start the host processes. ie WaWorkerHost.exe in case of worker role ,WaIISHost.exe in case of full IIS web role or WaWebhost.exe in case of SDK 1.2 HWC Web role
 -In case of full IIS web role, WaHostBootstrapper starts the IISConfigurator.exe process and configures the IIS Apppools, it is pointed to E:\siteroot\<index> where <index> is a 0 based website index.

 WaHostBootStrapper is listed as a process in the task manager with description " Microsoft Windows Azure Runtime Bootstrapper". It doesnt have  a windows service associated to it.WaWorkerHost.exe,WaIISHost.exe,WaWebhost.exe,IISConfigurator.exe etc are also listed as processes inside the role instance


Reference: http://blogs.msdn.com/b/kwill/archive/2011/05/05/windows-azure-role-architecture.aspx



No comments:

Post a Comment