peteisace
peteisace

Reputation: 2772

How do i host multiple versions of the same site on the same server?

i have a website, and i am migrating to a version 2. It's a staggered roll-out as opposed to big bang. What I intend to do is send a certain amount of traffic to the new site, and the rest the old version. I prefer not to do this on the load balancer (several reasons which I do not want to go into as it is business driven more than technical). I have a limited number of servers, so I do not wish to put the new code on dedicated servers. I also want to ensure the URL does not differ so as not to confuse the customer

The version two code is totally new and is not and will not be part of the version one codebase. The two must be isolated. Again; business driven but not negotiable.

(e.g.: he hits http://example.com/somepage, i do not want to redirect to http://new.example.com/somepage).

I am using IIS and ASP.NET MVC 4.0. I prefer a code based solution (httpmodules and putting something in the querystring for example) but cannot see how this would work.

Other than putting tonnes of iRules in the load balancer I am happy to hear any kind of solution, whether it is hardware / software / middleware.

Upvotes: 4

Views: 1629

Answers (1)

Chris Pratt
Chris Pratt

Reputation: 239300

The only way you could conceivably achieve this is via a load balancer. Otherwise, you run into the simple problem that a single domain can't be attached to multiple applications and multiple applications can't reside in the same document root. You could use a subdomain like new.example.com, but you explicitly said you don't want that. The only other alternative would be house the new app in a virtual directory of the old. Then, you could keep the domain the same, but you'd have to redirect from http://example.com/somepage to http://example.com/new/somepage. Also, the Web.config of the old application will apply to any other application housed in a virtual directory, so great pain would have to be taken to make sure there's no config bleed-through.

Upvotes: 2

Related Questions