October 24, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

How to Develop Scalable Apps Running on Windows Azure

  • September 6, 2012
  • By Vipul Patel
  • Send Email »
  • More Articles »

Introduction

One of the chief concerns of a Windows Azure developer is whether his cloud application can handle increased traffic and/or complexity of the tasks it performs. In other words, the developer needs to factor in whether the application is scalable or not.

Developers can look at the guidelines provided below to see how they can improve the availability and performance of their Windows Azure application.

Scale Out Your Application

It is very easy to scale out a Windows Azure application. If your application currently has a limited number of instances, you can increase the number of instances you intend to run in the cloud.

A sample service configuration file is shown below.

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="WindowsAzureProject1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">
  <Role name="WebRole1">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
    </ConfigurationSettings>
  </Role>
</ServiceConfiguration>

To increase the number of instances, you increase the “count” for the number of instances.

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="WindowsAzureProject1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">
  <Role name="WebRole1">
    <Instances count="10" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
    </ConfigurationSettings>
  </Role>
</ServiceConfiguration>

Now, when you deploy the package and the service starts spinning in the cloud, Windows Azure will automatically spin up 10 instances for your service to scale out.

If the service is already running in the cloud, you can visit the Windows Azure Management portal, navigate to the “Hosted Services” and click on Configure and change the setting directly without even needing to deploy your service.

Breakdown Activities into Decoupled Tasks

The second way to increase scalability of a Windows Azure application is to utilize the right type of roles – web roles and worker roles and blob storage for the appropriate actions.  Using an inappropriate type of role can have detrimental impact on the performance. Use a worker role to delegate the hard work via asynchronous operations.

Static Content Caching

Rather than having your webserver dish out the static content for every hit to your service, a cloud developer can leverage the CDN technologies to serve the static content from the nearest edge to the customer. The lesser the number of hops from the customer endpoint, the better the performance appears to the customer. Even more, the Windows Azure CDN technology works for web applications and not just for public blobs.

Leverage Traffic Manager to Scale Across Datacenters

Windows Azure Traffic Manager can be used to control the distribution of user traffic to Azure Hosted services. The services can be running in the same data center or across the globe. The traffic manager policy can decide which data center will service the request.

Synchronize Across Data Centers using Data Sync

Windows Azure developers can use SQL Azure Data Sync to keep the data across data centers in sync. This will make the latest data available from all the instances a Windows Azure service will be running.

Summary

In this article, we learned about how to improve the scalability of a Windows Azure application. I hope you have found this information useful.

Azure Free Trial

About the Author

Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul_d_patel@hotmail.com


Tags: Cloud, application, Windows Azure, Windows Azure Application Development




Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel