3

I'm launching a new site soon and I expect it to make it into mainstream media. At this point, I'm not sure our server will be able to handle all of the requests.

Is there a way that I can detect the server running too slow so that I can just serve a static HTML page (similar to how Twitter does this)? Are there tools out there?

Unfortunately I haven't dealt with this before, a Google search doesn't give me any answers other than: make sure you loadtest your site. We did, and it's not bad, but I want a fallback. Installing it on a huge server isn't an option.

I'm using Win2008 and IIS7 on the server.

sebastiaan
  • 135
  • 5

2 Answers2

1

Twitter displays the fail whale in reaction to HTTP Error 503. Therefore all you need is a customized error page for this error code.

Antoine Benkemoun
  • 7,314
  • 3
  • 41
  • 60
  • Ideally, I would want to have an error before the server starts to really crap out and starts throwing 503 errors. Any tools available for that? – sebastiaan Jun 29 '10 at 12:59
  • So, you want to give errors *before* the server can no longer serve? Seems a bit misguided to me. I like Antoine's answer of a custom 503 page. – mfinni Jun 29 '10 at 13:15
  • Well define "before the server starts to really crap out" first... Would that be a CPU percentage ? a disk IO use ? some magic trick ? – Antoine Benkemoun Jun 29 '10 at 13:59
  • Hehe, yes, magic trick please! :-) CPU percentage would be good, or a number of visitors maybe? – sebastiaan Jun 29 '10 at 16:10
  • You're on your own for this... Shell out your favorite scripting language and take a go for it. I don't think you have much of a choice... With Linux, I could do this fairly easily but it's not anything I would call "clean". – Antoine Benkemoun Jun 29 '10 at 20:33
  • Alright, I'll have to go with the 503 for now then, thanks guys! – sebastiaan Jun 30 '10 at 11:53
0

I won't claim this as an elegant idea... but I've done it for "maintenance mode" type activities.

Create a customized 404 page (not found) and configure IIS to use it. Now move/rename the web site. Every attempt will get that 404 page.

Chris_K
  • 3,434
  • 6
  • 41
  • 45