Windows Azure automates a lot of tasks for you, including initial deployment of your application. I thought I’d take a moment to describe at a high level what’s happening behind the scenes during that initial deployment and starting of an application.
- Allocation – The Fabric Controller looks at the inventory in the data center and finds VMs within servers that fit all the requirements of your application. One of those requirements is that resources are allocated across fault domains. As an example, a specific rack in the data center might be a fault domain. The Fabric Controller ensures that the hardware running your application isn’t all on one rack, so that if an entire rack goes down, your application stays up.
- Place role bits on nodes – The next step is to deploy the bits for your application’s roles (e.g. web role and worker role) onto the individual virtual machines that were allocated in step 1. If there’s been a recent update to the OS image, it’s possible at this point that a new OS image needs to first be copied to the machine and booted.
- Configuration settings – The next step is to apply any application-specific configuration settings that affect the setup of the virtual machine (like IIS settings).
- Start roles – Now we’re ready to actually start roles. For web roles, this means turning your web application on in IIS. For worker roles, this means invoking your role binary.
- Configure load balancers – If your application includes a web role, the next step is to configure the load balancer to route traffic to your web role. At this point your application is running.
If you’re interested in more detail about how these steps happen in the data center (and a lot more), I highly recommend Erick Smith and Chuck Lenzmeier’s PDC session “Under the Hood: Inside the Windows Azure Hosting Environment.”