Thursday, November 24, 2011

Azure Pattern - Scale Application

In Windows Azure for an application to scale out, it will run multiple copy of the code in various virtual machines. Windows Azure application consists of Web role instances and/or Worker role instances, each of which runs in its own Windows virtual machine.

Web role instance nothing but which accepts a HTTP/HTTPS request and respond back to customer web request via IIS 7 (ASP.NET Application). This instance needs to run in an IIS 7 Web Server only.

Worker role instance will do some background job (similar to Windows Service) and doesn’t expose to outside world directly. For instance one can use Worker role process to do some parallel bulk computing operations and then share with web role instance. A worker role can have any number of HTTP, HTTPS, or TCP endpoints. 

Queue: It allows Web role instances to communicate asynchronously with Worker role instances. It acts as a reliable and persistent messaging between services.  
Windows Azure services may be comprised of one or both types of roles and can run multiple instances of each type. Web / Worker Role instances can be added or removed based on demand and allow applications to quickly and economically scale-up or down as per the need. Windows Azure also exposes set of API’s to programmatically control the role instances.  

The typical Pattern for scaling up application on demand would look like below:


No comments: