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.

2 Answers 2

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.

6
  • 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, 2010 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, 2010 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 ? Jun 29, 2010 at 13:59
  • Hehe, yes, magic trick please! :-) CPU percentage would be good, or a number of visitors maybe?
    – sebastiaan
    Jun 29, 2010 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". Jun 29, 2010 at 20:33
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.

1
  • Thanks, but I need this to be automated based on the server's load.
    – sebastiaan
    Jun 29, 2010 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .