0

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?

Chuck
  • 3
  • 1

2 Answers2

1

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.

Marco Miltenburg
  • 1,121
  • 8
  • 9
  • 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 04 '11 at 16:30
0

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.

TomTom
  • 50,857
  • 7
  • 52
  • 134
  • 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 02 '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 02 '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 03 '11 at 08: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 03 '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 03 '11 at 16:35
  • Actually it is because you can upgrade half the servers while they are off, then switch over and upgrade the rest. – TomTom Nov 03 '11 at 19:37
  • Assuming that half of the servers can handle all the traffic while performing the upgrade. And how quickly can you revert to an older version in case of unexpected problems? I would not want to do it like that in a web farm as I think there are more flexible solutions. But, I'm guessing Chuck doesn't need a web farm for his website. His suggested rewrite rule is a (simple) deployment solution that will work but it has some draw backs. The ARR solution is more transparent and can even be used on a single server. – Marco Miltenburg Nov 03 '11 at 21:55