Is there any way to redirect user to a static page when server is overloaded? Maybe showing a alert page and inform user to come back later because server is currently overloaded.
-
How do you determine that the web server is overloaded? Or is that also a part of the question? – Tasos K. Jan 26 '14 at 18:41
-
did you tried when the web server is overloaded? – Kiquenet Jun 23 '16 at 08:48
1 Answers
I think the first thing you'd need to do is to determine at what point your server becomes 'overloaded' i.e. when does the performance (responsiveness) of the website become unacceptable. For this you'd need to run a tool such as WCAT. From the download page:
Web Capacity Analysis Tool (WCAT) is a lightweight HTTP load generation tool primarily designed to measure the performance of a web server within a controlled environment. WCAT can simulate thousands of concurrent users making requests to a single web site or multiple web sites. The WCAT engine uses a simple script to define the set of HTTP requests to be played back to the web server. Extensibility is provided through plug-in DLLs and a standard, simple API.
Once you have that information, you could either access the performance counters of the web server or perhaps do something as simple as counting the number of active sessions. Should the number of active session be above a configurable threshold (perhaps in your web.config), redirect to your simple static page.