views:

52

answers:

2

Duplicate Question

Hi All,

I have an asp.net app that I want to deploy safely (with as little down time possible). I would love to do something like blue green deployment but without the need for a second web server.

So, I know I can use load balancing, etc but I need a quick and cheap approach. I was thinking of doing something like:

  • Setting up another website (copy of original) in IIS, currently I use host headers to direct traffic across sites).
  • I could then view the new site locally until the site is totally online (due to NHibernate start up and various other high intensity tasks this takes a while).
  • Once site 2 is totally started I would then change host headers around giving me a much much smaller down time.

So my question is. Has anyone done anything like this? Will IIS restart my app pool or application when changing host headers (making this useless)? Any other options?

Thanks for your help all.

Guido

+2  A: 

If you touch web.config, your app pool will recycle. Even then, when you redirect to the new site, it is in a different path and hence a new session object will be created (if you are using session that is). What about the cookie? Would you set it using a root path? Otherwise the cookie will not be shared between the two sites.

The simple solution would be to actually take down the site (app_offline.htm), copy files over and maybe peform a warm startup.

http://learn.iis.net/page.aspx/688/using-the-iis-application-warm-up-module/

Have you considered ARR?

http://www.iis.net/download/applicationrequestrouting

Raj Kaimal
Hi Raj,A few comments on your post: I'm not touching web.configs.I don't mind loosing session cookie data on the switch over (my app actually does not use sessions). First link - I'm on IIS6 :( . Second link - thats just load balancing isnt it?
gatapia
Yes the second is load balancing (you could probably do it all on one server though). *New line* IIS warm up script (never used it ) http://blogs.msdn.com/joelo/archive/2006/08/13/697044.aspx *New line*Changing host headers should not cause the app pool to recycle. Doing things like touching web.config or changing files in the bin dir will. *New line*If your site is under such heavy load, shouldn't you be doing load balancing anyway? ;-)
Raj Kaimal
'shouldn't you be doing load balancing anyway' - Yes that would be logical :) Let's just say I could not sell that idea.I found suggestions in this thread i am currently investigating:http://stackoverflow.com/questions/148084/how-to-deploy-an-asp-net-application-with-zero-downtimeIf these work I will close this question off as a duplicate.
gatapia
A: 

This question is a duplicate, please close:

Original question with good responses here.

Thanks all

Guido

gatapia