If you are unfortunate enough to suffer a total failure of all of your webservers, all is not lost. Stingray Traffic Manager can host custom error pages for you, and this article shows you how! If all of the servers in a pool have failed, you have several options:
However, you may reach the point where you've got nowhere to send your users. All your servers are down, so failure pools are not an option, and you can't redirect a visitor to a different site for the same reason.
In this case, you can use a third option:
Use the error_file setting in the Virtual Server configuration to specify the response if the back-end servers are not functioning. The error file should be placed in your Extra Files catalog (in the 'miscellaneous files' class:
<html> <head> <title>Sorry</title> <link rel="stylesheet" href="main.css" type="text/css" media="screen" > </head> <body> <img src="logo.gif"> <h1>Our apologies</h1> We're sorry. All of our operators are busy. Please try again later. </body> </html>
This HTML error page will now be returned whenever an HTTP request is received, and all of your servers are down.
Note that the HTML page has embedded images and stylesheets. Where are these files hosted? With the current configuration, the error page will be returned for every request.
You can use a little TrafficScript to detect requests for files referenced by the error page, and serve content directly from the conf/extra/ directory.
First, we'll modify the error page slightly to may it easier to recognize requests for files used by the error page:
<link rel="stylesheet" href="/.extra/main.css" type="text/css" media="screen">
Then, upload the main.css and logo.gif files, and any others you use, to the Extra Files catalog.
Finally, the following TrafficScript request rule can detect requests for those files and will make the traffic manager serve the response directly:
Copy and paste this TrafficScript into the Rules Catalog, and assign it as a request rule to the virtual server. Images (and css or js files) that are placed in the Extra Files catalog can be refered to using /.extra/imagename.png. You will also be able to test your error page by browsing to /.extra/errorpage.html (assuming the file is called errorpage.html in the extra directory).