views:

51

answers:

3

I have an ASP.NET MVC web application that is hosted on a shared hosting account. The site has no issues during regular usage. However the nature of the business is such that for one week out of the month we have very very high traffic. During these high traffic peak load times, my application has several "Service Unavailable".

One of the possible solutions I am looking at is to spin up a Windows Azure web role during peak traffic week and spin it down again after the week is up. (I know exactly when the load is going to be high) Right now, we don't have enough revenue to justify moving the site permanently to the cloud.

My questions is how to I handle DNS. I would like the move to Azure and back to hosted service to be seamless to the user. The user should be able to type my normal URL and go to my hosted site during off peak weeks and to the cloud app during peak week. My guess is to add some kind of CNAME record to the DNS server but I have no idea how to go about doing this. Anybody know of any resources on how to update the DNS so this scenario would work?

A: 

Is it possible to just have the MVC site hosted on another web hosting account permanently? It doesn't necessarily have to be an Azure account, does it? Is the site written in MVC1 or MVC2?

SidC
A: 

If your shared hosting server cannot handle the peak then 1 instance of the web worker role in Azure probably won't work either.

I would try something else: keep your asp.net code on that server but move all the static content somewhere else (for example the Azure CDN) using a subdomain. If you use Jquery and serve the file from your website then you can change the link to either Google's CDN or Microsoft's CDN already for free.

ZippyV
I will try this. I already have an amazon CDN account. One issue I had was with a bunch of static JSON files hosted on the same server. I had issues with HTTP GET vs. HTTP OPTION when doing cross domain JSON get calls. I have to see if Amazon CDN supports HTTP OPTION instead of HTTP GET.
Mike Weerasinghe
One web role would have much more capacity than a typical shared hosting account. There could be hundreds to thousands of sites running on a shared hosting account. An Azure web role is equivalent (actually is as currently implemented) to a dedicated server with about a 2GHz processor.
Matt Spradley
+1  A: 

Yup, a CNAME record sounds to me like the way to go. See http://blog.smarx.com/posts/custom-domain-names-in-windows-azure. (Sorry, one of the images looks broken... I'll try to patch that up.)

The scheme would be: have www.foo.com point to your current app instance, and then change it to point to something.cloudapp.net when that week comes up... then switch it back after the rush is over.

smarx
Thanks for the reply. Your blog was one of the sites I went to. I couldn't see the details under the "Forward the root domain" heading. Hope you get a chance to fix it.
Mike Weerasinghe