« Web Site Innovation : Northwestern Mutual Wins 2010 Innovator Award | Main | Expression Studio 4 Available »

An efficient way of deploying a static web site on Windows Azure

In discussions, we realized that developing and deploying a simple static web site on Windows Azure might turn out to be an uncalled affair of work for development and deployment. Let us take a simple example of a restaurant where the owner wants to put a web site for the internet presence. This site would mostly have static web pages and relatively low traffic of local consumers. Let us build a hypothesis for this type of static web sites. I want to stress a point; a Static site doesn't mean a plain vanilla site of images and text. Instead it could mean using Flash, SilverLight and JavaScript capabilities to increase richness of the web site.

A straight forward approach to deploy such sites on Windows Azure could be by creating a cloud service project in visual studio, creating HTML pages with SilverLight, Flash and JavaScript etc. and deploying it on Windows Azure Hosted Service. To handle such a simple web site as well calls for a developer, deployment skills and management of site content becomes an overhead.

The interesting and efficient way of deploying such static web site could be using only the blob storage and managing it from any of your favorite Azure Storage Explorer.

To explain it with an example I have created a public blob container in my Azure Blob Storage account and uploaded the HTML files, Javascript files and .xap file for SilverLight. While using these static files make sure you use the relative URLs for referring the other pages and accordingly either create the containers for the folders or name your blobs with virtual containers. For example, if you want to refer images from a folder images in all of your html files then it's a good idea to create a public container called Images and upload all the image files within that. Make sure to create your containers and blobs as public to be able to provide access to the anonymous users.

Below is a sample structure of one of the sample site blob structure uploaded and managed through Azure Storage Explorer.         

 

StaticSiteBlobs1.jpg

Image : A Sample Blog Storage Structure for a Static Web Site

This approach makes it incredibly easy and quick way of deploying and managing a static web site on Windows Azure.  Also, you could very well develop your complete site using your designer tools and any of your favorite HTML editors only.

If you are aware of the Windows Azure charges of consumption then you might have realized by now that this approach saves your dollars too.  Yes! You don't have to provision a web role to run your web site; instead your site is running from the Azure blob storage itself and in turn saving charges required for running a web role.

  You could very well create CNAME mapping to have your DNS name point to azure blob storage and make your site running from your own DNS name instead of an unfriendly URL like http://<account>.blob.core.windows.net/ .

Hope you agree this being an efficient way of deploying static web sites on Windows Azure.

 

Comments

‘A static website on Windows Azure’ is like an oxymoron!
Nevertheless, a good Hello-World-Example-like approach for beginners. Pardon my ignorance, but is IIS integral part of Windows Azure Hosted service OR does it have IIS-like capabilities? Basically, who provides the web server capabilities for hosting a web site on Windows Azure Hosted service? Can we put custom HttpModules/Handlers pipeline in place to process web requests?

This is a interesting solution. i am curious to understand as to how Azure handles the Portal like functionality. Do we have to build portal framework/functions on Azure or is MSFT porting Sharepoint on to this?

Excellent idea. Now Azure is providing CDN capabilities, which caches blob and can improve response.

Hello Laxman, looks like you didn't get the point when you say it’s like an oxymoron :). Azure Web Role under hosted services provides IIS like capability rather it’s an IIS only. Windows Azure VM provisioned for web role provides capabilities for IIS and you can very well configure HttpModules/Handlers as part of your web role configuration.
The point here is to deploy and manage a static website without using a Web Role.

Rishikesh, for Sharepoint kind of solutions you might want to check Microsoft Online services called as BPOS. Please check here http://www.microsoft.com/online/products.mspx.

Thanks Shankar, Azure CDN capability makes it more efficient for static web site deployment. In near future we might see a new business paradigm using Windows Azure like services for hosting static web sites.

Sachin,
I got your point. When I said it is like oxymoron, I was not talking about the blog but only about the title - 'A static website on Windows Azure’. A static website is a thing of the past whereas Azure is the future. Who would deploy a 'static' website on Azure?

Thanks for clearing my doubt about IIS-like capabilities.

Sachin,
thanks for nice article.
how efficient and relliable is pre/post production support of online Azure services with MS? I've seen couple of instances when production deployment failed despite successful stage site in Azure platform? Are we in stage when customers can be advised to use it for their critical business webspace?

Hey this is a nice idea and nice way to think. This might be a good idea for putting some static help pages and tutorials. Without creating Hosted projects and Azure Hosting environment one would be able to run static pages.

Good Thought Man :)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter