Windows Azure Web, Worker, and CGI Roles – How They Work

This is a write up I’ve put together of how the roles in Windows Azure work.  As far as I know, this is all correct – but if there are any Windows Azure Team Members out there that wouldn’t mind providing some feedback about specifics or adding to the details I have here – please do add comments!  🙂

Windows 2008 and Hyper-V

Windows Azure is built on top of Windows 2008 & Hyper-V. Hyper-V provides virtualization to the various instance types and allocation of resources to those instances. Windows 2008 provides the core operating system functionality for those systems and the Windows Azure Platform Roles and Storage.

The hypervisor that a Hyper-V installation implements does a few unique things compared to many of the other virtualization offerings in the industry. Xen (The Open Source Virtualization Software that Amazon Web Services use) & VMWare both use a shared resource model for utilization of physical resources within a system. This allows for more virtualized instances to be started per physical machine, but can sometimes allow hardware contention. On the other hand Hyper-V pins a particular amount of resources to a virtualized instance, which decreases the number of instances allowed on a physical machine. This enables Hyper-V to prevent hardware contention though. Both designs have their plusses and minuses and in cloud computing these design choices are rarely evident. The context however is important to know when working with high end computing within the cloud.

Windows Azure Fabric Controller

The Windows Azure Fabric Controller is kind of the magic glue that holds all the pieces of Windows Azure together. The Azure Fabric Controller automates all of the load balancing, switches, networking, and other networking configuration. Usually within an IaaS environment you’d have to setup the load balancer, static IP address, internal DNS that would allow for connection and routing by the external DNS, the switch configurations, configuring the DMZ, and a host of other configuration & ongoing maintenance is needed. With the Windows Azure Platform and the Fabric Controller, all of that is taken care of entirely. Maintenance for these things goes to zero.

The Windows Azure Fabric Controller has several primary tasks: networking, hardware, and operating system management, service modeling, and life cycle management of systems.

The low level hardware that the Windows Azure Fabric Controller manages includes switches, load balancers, nodes, load balancers, and other network elements. In addition it manipulates the appropriate internal DNS and other routing needed for communication within the cloud so that each URI is accessed seamlessly from the outside.

The service modeling that the fabric controller provides is a to map the topology of services, port usage, and as mentioned before the internal communication within the cloud. All of this is done by the Fabric Controller without any interaction other than creating an instance or storage service within Windows Azure.

The operating system management from the Fabric Controller involves patching the operating system to assure that security, memory and storage, and other integral operating system features are maintained and optimized. This allows the operating system to maintain uptime and application performance characteristics that are optimal.

Finally the Fabric Controller has the responsibility for service life cycle. This includes updates and configuration changes for domains and fault domains. The Fabric Controller does so in a way to maintain uptime for the services.

Each role has at least one instance running. A role however can have multiple instances, with a theoretically limitless number. In this way, the Fabric Controller, if an instance stops responding is recycled and a new instance takes over. This can sometimes take several minutes, and is a core reason behind the 99.99% uptime SLA requiring two instances within a role to be running. In addition to this the instance that is recycled is rebuilt from scratch, thus destroying any data that would be stored on the role instance itself. This is when Windows Azure Storage plays a pivotal role in maintaining Windows Azure Cloud Applications.

Web Role

The Windows Azure Web Role is designed as a simply to deploy IIS web site or services hosting platform feature. The Windows Azure Web Role can provide hosting for any .NET related web site such as; ASP.NET, ASP.NET MVC, MonoRails, and more.

The Windows Azure Web Role is provides this service hosting with a minimal amount of maintenance required. No routing or load balancing setup is needed; everything is handled by the Windows Azure Fabric Controller.

Uses: Hosting ASP.NET, ASP.NET MVC, MonoRails, or other .NET related web site in a managed, high uptime, highly resilient, controlled environment.

Worker Role

A worker role can be used to host any number of things that need to pull, push, or run continuously without any particular input. A service role can be used to setup a schedule or other type of service. This provides a role dedicated to what could closely be compared to a Windows Service. The options and capabilities of a Worker Role however vastly exceed a simple Windows Service.

CGI Role

This service role is designed to allow execution of technology stacks such as Ruby on Rails, PHP, Java, and other non-Microsoft options.

Windows Azure Storage

Windows Azure Storage is broken into three distinct features within the service. Windows Azure provides tables, blob, and queue for storage needs. Any of the Windows Azure Roles can also connect to the storage to maintain data across service lifecycle reboots, refreshes, and any temporary loss of a Windows Azure Role.

A note about Windows Azure Storage compared to most Cloud Storage Providers: None of the Azure Storage Services are “eventually consistent”. When a write is done, it is instantly visible to all subsequent readers. This simplifies coding but slows down the data storage mechanisms more than eventually consistent data architectures.

Shout it

Windows Azure and the PaaS Context

PaaS stands for Platform as a Service.  The new concept around Devops* (Developer + Operations) has allowed cloud computing to reach an apex of agility for business.  For developers PaaS provides an ultimately clean and agile experience around staging and deployment.  PaaS is also the highest level of cost savings for most prospective enterprise and mid-size business users of the cloud computing services.  Windows Azure has positioned itself with the vast majority of its services as a platform.

Working with a platform, instead of an infrastructure based cloud computing service allows Devops to focus almost solely on the business problems.  In addition this prevents an unnecessary staffing level for IT in most organizations.  With staff re-focused on business problems and eliminating the majority of hardware issues in an organization costs go down while return on investment dramatically increases.

The Ideal PaaS Scenario, Athenaeum Corporation

Imagine a company, I’ll call it Athenaeum Corporation that has around 250 people and provides a web based on demand service.  Right now they have 4 geographically dispersed data centers that incur real estate, staffing, energy, and other costs.  In each of those geographically dispersed data centers there are network switches and dedicated web servers connected to clustered with failover databases.  Each set of clustered databases is setup to replicate among all the geographically disperse locations everyday on a near real-time basis.  The website that these locations host is then balanced by load balancers, which also require maintenance and administration.

The headquarters of this company is located away from the data centers, but has a smaller duplicate data center of its own that also receives replicated data and hosts the website.  This is for internal and development purposes.  The development team consists of approximately 45 people out of the 250 staff.  The network operations staff is about 25 people, with internal IT making up another 15 people.  Altogether the direct support of development and operations is 85 people out of a 250 person staff.

At the headquarters are approximately 280 machines ranging from desktop PCs to Laptops.  These machines are used to support operations, sales, accounting, support, and every other part of the company.  These 280 machines are connected to approximately 60 internal servers that provide things like Exchange Services, file sharing directories, communications on instant messengers, Sharepoint services, and other IT related tools.  In addition there are other switches, cabling, and other items related to the routing, load balancing, and usage of these internal services.

The Athenaeum Corporation that I’ve described is a perfect scenario that could literally save hundreds of thousands of dollars with cloud computing services.  While saving that money they could possibly increase their physical service, better their uptime & system processing performance, and more just by migrating to the Windows Azure Platform.

Before jumping into how a company like the Athenaeum Corporation might jump into PaaS with the Windows Azure Platform, let’s take a quick review of the services that the Windows Azure Platform provides.

The Platform of Windows Azure

The core Windows Azure Platform is made up of compute and storage.  The compute is broken up into Web, Worker, and CGI Roles.  The storage is broken up into Table, Blob, and Queue services.  All of these features have a platform SDK that can be used or RESTful Web Service APIs.  From the basis of an operating system, it is abstracted away and only the platform is of concern to development.

Beyond the core compute and storage elements the Windows Azure Platform cloud has the Windows Azure AppFabric and the SQL Azure Relational Database for service bus, security access control, and storage of highly structured data.  The AppFabric is made up of two core features; the access control and the service bus.  The SQL Azure is really just a clustered, high end instance of SQL Server running with a hot swappable backup that is managed by Microsoft in their data centers.

The Windows Azure AppFabric is one of the features of Windows Azure Platform that makes working with on-premises, internal, disparate, and Windows Azure Platform or other cloud services easy.  With the AppFabric access control security, claims based identification, and other authentication mechanisms may be used for seemless single sign-on experiences.  With the systems secured with the access control, the AppFabric service bus can then be used as a way to manage and keep communication between those disparate systems flowing and active.  The AppFabric Access Control & Services Bus provides a way to incorporate any request to incorporate systems that a business enterprise, government, or other entity may have.

With SQL Azure, a hosted, high end solution to relational data storage needs is provided.  One big concern is that the data sizes are to 50GB in storage.  Although the there is this 50GB limit, once this size has been attained the data most likely should not be contained solely in a relational data store.  This is when the other Windows Azure Storage mediums come into play.  But for data under 50 GB, a relational data store setup to work seamlessly in Windows Azure like this provides additional platform capabilities for developers to port traditionally hosted applications into the cloud with minimal changes.

Now that the platform is covered, how would the Athenaeum Corporation move their system & website operations into the Windows Azure Platform for increased capabilities and decreased costs?  The first thing needed is a breakdown of the individual systems and interoperations.

  1. Relational databases in each of the geographically dispersed data centers with failover databases.
  2. Headquarters has 280 PCs and Laptops.
  3. Headquarters has 60 internal IT maintained servers with custom applications, file-sharing, and other tools running on Windows Server.
  4. Load balancing is done for the web based on demand services in house.
  5. 4 Data Centers geographically dispersed with respective real estate, staffing, energy, and other costs.
  6. Network operations requires approximately 25 staff for 24-hour a day operational uptime.
  7. Web Based On Demand Services.

I’ll start breaking down these 7 key functionalities and state how the move to Windows Azure would change costing by using the platform.  Relational databases in each of these data centers can be moved in a couple different ways.

  1. One is to move the databases into one single primary SQL Azure instance.  Since the databases are most likely located at each of the datacenters for location CDN reasons, it made sense before, but with the move to the cloud the Windows Azure CDN could be used and the database would likely have better access to the geographically dispersed web presence points.
  2. The second is to move the databases to affinity points within the cloud that already match the current locations, porting the replication functionality for the specific data that each site needs.
  3. The 280 PCs and Laptops would still need connectivity and access to all of the existing applications they have now.  The cloud changes little in regard to this situation.  However redundant machines could be removed and with the implementation of SaaS based solutions, which I’ll discuss further in the next section, would dramatically decrease the cost of machines that each employee would need along with a decrease in support, administration, and maintenance of the software they currently use.
  4. The 60 internal servers at headquarters that IT maintains could be migrated completely, especially if they’re all running a Windows Operating System.  For anything that isn’t, one may want to look to AWS, Rackspace, or other virtualization solution at these cloud providers.  In Windows Azure internal servers hosting IIS applications could likely have them moved to Web or Worker Roles.  Anything such as Ruby on Rails, PHP, or Java that is hosted via IIS can be moved to a CGI Role in Windows Azure.  For anything that has other complexities and such can be installed on a Windows Azure VM Role.
  5. Current in house load balancing can be eliminated entirely.  There is no need for in house management of this with a PaaS like the Windows Azure Platform.  So mark this off the cost list, it is included in the cost of the service and requires no configuration, management, or other interaction.
  6. Each data center that previously provided geographic locations for the web presence can be brought into the Windows Azure Cloud.  There are two primary locations in North America at this time, and several more in other countries throughout the world.  With this ability the need to have 4 different data centers is removed.  In most cases, the centers that Windows Azure is located in also have significant security and penetration tests done at a physical level.  This effectively increases the security of each of the geographic access points.  Removing one more cost, while providing more for the money.
  7. Network operations, effectively simplified by the removal of routing, load balancing, and other concerns that needed to be done in house.  The cloud offers 24x7x365 operational uptime.  This eliminates the need for the in house staffing, with only a 4-6 staff needed for this particular scenario.  The roles and requirements for the 4-6 staffing positions would primarily be there to maintain data, assure that systems that are custom are maintained and operational within the Windows Azure Cloud.
  8. The last item is easily moved into the Windows Azure Platform using a Windows Azure Web Role.  This provides everything needed to operate a SaaS Web Application with the Windows Azure Portal PaaS.

On that last point of moving the Athenaeum Software into the Windows Azure Cloud, is SaaS on the Windows Azure Platform.

Software Dev Conferences

Recently a discussion popped up on the Seattle ALT.NET group. I put together some of the conferences that were brought up. I may, or may not, be attending some of these.  So far this is my “Ruby on Rails” and “.NET” Conference list.  I really need to figure out with big data, NoSQL, and Cloud Computing Conferences (asides from the conferences I’ll be working with NW Cloud to organize) that I should attend.

Are there any conferences that I haven’t listed for 2011 that I should attend? Any that you are attending? Let me know, I’m putting together a list to figure out what would be a good conference list to attend for this year.

SPLASH 2011 October 22 TO 27 Hilton Portland & Executive Tower Portland, Oregon, USA http://splashcon.org/2011/

Node.conf May 5th, 2011 Portland, OR http://nodeconf.com/

Jsconf May 2nd & 3rd, 2011 Portland, OR http://2011.jsconf.us/

Dates: Mar 4-5, 2011. (fri-sat). ($220) 7000 State Highway 161, LC1 Building (Right Tower) Irving, TX 75039 http://www.jointechies.com/

March 17-18, 2011 Salt Lake City Public Library 210 E 400 S Salt Lake City, UT 84111 http://mtnwestrubyconf.org/

February 3-5, 2011 Crowne Plaza San Pedro, CA http://www.larubyconf.com/

Windows Azure and the IaaS Context (or lack thereof)

Windows Azure has several primary competitors in the IaaS Realm, even though they aren’t technically an IaaS Cloud Provider at all.  Some of these competitors in this space are Amazon Web Services (AWS), Rackspace, GoGrid and VMWare.  Each of these providers offer virtual machines with either Windows or Linux Operating Systems, multiple data centers for geographically dispersed access, dynamic scaling, and other features associated with hosting infrastructure in cloud computing.

Some of the more dedicated infrastructure services provide content delivery, routing, load balancing, virtualized instances, virtualized & dedicated private clouds, DNS routing, autoscaling at an infrastructure level and more.  Some of the providers and their respective services are listed below:

Amazon Web Services Infrastructure Services

  • Amazon Cloudwatch enables Autoscaling.
  • Amazon Cloudfront is a content delivery network (CDN).
  • Amazon Route 53 for highly available and scalable DNS.
  • Amazon Virtual Private Cloud (VPC) for secure bridges into on-premises computing.
  • Elastic Load Balancing for distributing incoming application traffic.
  • SQS, or Simple Queue Service for messaging.
  • SNS, or Simple Notification Service for alerting.

Rackspace Infrastructure Services

  • Content Delivery Network (CDN)
  • Simple Load Balancing using virtualized server to provide load balancing.

GoGrid Infrastructure Services

  • Content Delivery Network (CDN) with a boasted 18 points of presence on 4 continents.
  • F5 Hardware Load Balancing
  • Data Center specific provisioning.
  • Autoscaling with Vertical RAM Scaling and more features.

Pricing IaaS

These companies offer a lower price point, which plays into the assumption that the user of the cloud services is skilled in setting up the needed networking, access, services, servers, and other things needed for each virtual machine launched within the respective cloud environment.  Some of the price points, especially in regards to Linux, are 1/3rd to 2/3rd the price of Windows Azure.

The Windows Azure advantage is at a higher price point, but lower total cost of ownership.  This advantage unfolds when operating in the dedicated development environment, but removing the networking and information technology arm of a company.  Basically, a company buys the cloud services from the grid just like they would the building power for their headquarters.  This leaves the generation of power, or simply the compute power, to a dedicated utility instead of having in house management of these resources.

Infrastructure Services

There are a number of companies in the technology industry today that offer infrastructure services.  Infrastructure services generally revolve around a few specific characteristics;

  • Content Delivery
  • Routing & Load Balancing
  • Virtual or Dedicated Private Cloud
  • Operating System Virtualized Instances

Windows Azure provides two primary infrastructure services.  Both of the services are somewhat minimal, since Windows Azure is focused on being a platform and not an infrastructure.  The service is the Windows Azure Content Delivery Network and the Windows Azure VM Role.

The content delivery network is provided as an add-on to the Windows Azure Storage to provide faster geographically dispersed access to data.  This increases the speed of access to the data and sties within the Windows Azure Cloud Platform.

Windows Azure VM Role

Windows Azure as marketed by Microsoft is not an infrastructure service.  However Microsoft has broken from being a pure platform only service with the Windows Azure VM Role.  The Windows Azure Platform is still primarily a platform service, but the VM Role has been provided with the intent of migrating customers that may need a full machine instance of Windows Server to run existing applications.  This enables an enterprise or other business to start migrating existing applications without a complete rewrite of those applications.

This enables the migration of applications that have long, non-scriptable, fragile installation steps to be moved into the Windows Azure Cloud Platform.  The VM Role does pose a possible distraction to developers, who should focus on developing applications against the Windows Azure Web or Service Roles.  This provides the greatest benefit and chance for savings over time.  In addition the roles are patched, and kept up to date by Windows Azure instead of needing hands on maintenance from the account holder or developers.

On a Windows Azure VM Role the operating system, updates, and other maintenance of the role are left up to the account holder.  Microsoft offers no automated patching or other support.  The VM Role must also be monitored by the account holder.  Windows Azure knows when the system becomes unresponsive but otherwise doesn’t act unless the system completely crashes, shuts down, or otherwise stops.

The VM Role is also advantageous when an account holder or developer needs elevated privileges for a particular application.  This however does not mean it is an encouraged practice to use elevated privileges for application development within Windows Azure.  But the VM Role offers the ability for those situations that are inflexible and require abrogation of good design principles.  This feature offers the ability to install MSIs, custom configure IIS, or otherwise manipulate the server environment for hosting needs.

One of the largest concerns with the VM Role is that the savings and decrease in maintenance associated with Windows Azure Platform managing the networking, load balancing, and other related infrastructure services.  The VM Role does not retain this automated level of management and at this time does not have load balancing or other features enabled.  Load balancing can be done externally to the Windows Azure Platform, but requires CNAME and custom DNS management in order to do so.

Git Updates

Here’s my latest Git Ignore file for .NET Development.

#Begin .ignore file #OS junk files [Tt]humbs.db *.DS_Store

#Visual Studio files *.[Oo]bj *.dat *.crc *.exe *.pdb *.user *.aps *.pch *.vspscc *.vssscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh *.bak *.[Cc]ache *.ilk *.log *.lib *.sbr *.sdf ipch/ obj/ [Bb]in [Dd]ebug*/ [Rr]elease*/ Ankh.NoLoad

#Tooling _ReSharper*/ *.resharper [Tt]est[Rr]esult*

#Project files [Bb]uild/

#Subversion files .svn

Office Temp Files

~$*

#End .ignore file

I added a starting Git workflow on my domain here: http://www.adronbhall.com/Home/GitWorkflow