I've seen this: Zero downtime uploads / Rollback in IIS, but for a small site, ARR seems like overkill. I'm wondering if it'd work to have a web.config like this

<?xml version="1.0" encoding="UTF-8"?>
<configuration><system.webServer><rewrite><rules>
  <rule name="Rewrite to current production version">
    <match url="(.*)" /><action type="Rewrite"
      url="production-version-0/{R:1}" />
  </rule></rules></rewrite></system.webServer>
</configuration>

To deploy, drop in the directory production-version-1, and then over-write web.config so that it points to the new version. This is a PHP site. Will I regret doing it this way?

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

Apart from the obvious penalty of having a rewrite in every request (also for static content) it also might give problems with self referencing scripts. Scripts that ask PHP for their filename (e.g. $_SERVER['SCRIPT_NAME']) will get the rewritten URL and not the URL that is shown in the user's browser.

link|improve this answer
We already have a lot of rewrites, so we may move them into this file, and most of our static content is being served from a CDN anyway. That said, I really should make the time to get ARR working. Thanks! – Chuck Nov 4 '11 at 16:30
feedback

it can not be. Point.

See, your problem is that with one system only you never reach zero downtime because sometimes something faults and / o you need a reset due to patching. Point.

Playing around with this requirement wont get you anywhere. You need 2-3 systems at least, and then you can use NLB easily, so no need to pull anything.

link|improve this answer
Don't think he was looking for zero downtime from a fault tolerant point of view but more from a site upload point of view. He wants to upload a new version of the site to a new folder and then by only changing this rewrite rule switch the entire site to that newer version. – Marco Miltenburg Nov 2 '11 at 21:28
Well, I dont really care what he THOGUHT he says, I read what he says and answer to what. People not able to express their questions wont get far anyway. – TomTom Nov 2 '11 at 23:30
Nowhere in his question I see him say anything about trying to achieve zero downtime in his hosting solution. Contrary, he only talks about an upload / deployment solutions that will allow him to easily switch between versions of the website / code with zero downtime. – Marco Miltenburg Nov 3 '11 at 8:29
He talks about zero downtime, and no solution gives you zero downtime outside of a cluster, which ALSO handles the upload scenario. – TomTom Nov 3 '11 at 12:39
Zero downtime does not only relate to zero hardware downtime. I don't see how a cluster of web servers is going to magically solve any issues with deploying new versions. I think it only adds complexity. – Marco Miltenburg Nov 3 '11 at 16:35
show 2 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.