Q34.Creating a Scalable Web Application with Background Processing in Windows Azure?
Most web applications accept requests from users and hand over the job of processing to a different component of the application. In Azure, Cloud applications web roles are the front end of the applications, accept requests and place these requests into a queue and worker role instances do the backend processing by polling the queue and pick up the queue item. Once a worker role has picked a worker item in the queue, other worker role instances cannot pick that item. This feature is built into the Azure queue service and results in a better performance as the tasks are split among the web role and worker role instances.
For example, in an Order Processing application, the web role instances which accept order details from end users, pass the order requests to Queues which hold these requests till they are picked up by the worker role instances for processing. In Cloud applications, multiple web role instances and worker role instances exist and this is done to facilitate acceptance of multiple simultaneous requests and ensure high response times. While processing an Order, the application uses Azure storage for persisting data.
The main advantage we get by splitting an application into different roles is that we can scale the roles independently. Cloud applications are designed to facilitate background processing of tasks by worker roles, while other components of the application are free to take up other tasks. In this example, while the worker roles are busy processing orders, web roles are free to accept new requests. It is the responsibility of the developers to arrive at the number of web role instances and worker role instances, so that the user is happy with the high response times of the application.
An Order Processing application is one which can accept orders placed by customers, process them and facilitate further action. In a high volume sales situation an order processing application should be able to receive large number of orders, process the orders and make the data available for other services.
Worker item is the information placed by web role in the queue. This worker item is picked up by the worker role for processing.

For example, in an Order Processing application, the web role instances which accept order details from end users, pass the order requests to Queues which hold these requests till they are picked up by the worker role instances for processing. In Cloud applications, multiple web role instances and worker role instances exist and this is done to facilitate acceptance of multiple simultaneous requests and ensure high response times. While processing an Order, the application uses Azure storage for persisting data.
The main advantage we get by splitting an application into different roles is that we can scale the roles independently. Cloud applications are designed to facilitate background processing of tasks by worker roles, while other components of the application are free to take up other tasks. In this example, while the worker roles are busy processing orders, web roles are free to accept new requests. It is the responsibility of the developers to arrive at the number of web role instances and worker role instances, so that the user is happy with the high response times of the application.
Important words:
Order Processing application
An Order Processing application is one which can accept orders placed by customers, process them and facilitate further action. In a high volume sales situation an order processing application should be able to receive large number of orders, process the orders and make the data available for other services.
Worker Item
Worker item is the information placed by web role in the queue. This worker item is picked up by the worker role for processing.
See More Questions and Answers on - Azure Cloud Services (cont..)
- creating a parallel processing application in windows azure?
- How does fabric controller place and manage role instances of an application across fault domains?
- What is a local storage and how to configure local storage resources?
- Service configuration and service definition files in Azure?
- What are compute emulator and storage emulator?
- How do we setup the development environment for Azure applications?
- What is Azure storage?
- What are the benefits of scalable storage service?
- Why Azure cloud applications need consistent, durable, and scalable storage service?