Wednesday, March 31, 2010

How to show a maintenance page for website when our network is down

SkyHi @ Wednesday, March 31, 2010
Question:
We host our ASP.NET web sites internally (within our DMZ). When we are
doing network maintenance, etc we would like to have our sites display a
maintenance page, but our network is down so our hosting servers are
off. We don't host our DNS entries (it is handled externally) so we
could have a maintenance page hosted externally, but pushing a DNS
change for maintenance would take too long. What kinds of solutions
could we employ to handle network outages here while still giving our
external users some indication that we still exist? What has worked for
you and what have you tried?

Solution:
An offsite reverse proxy that points to your live site could display a
default page when the backend site is not available.


====================

you could place some reverse proxies (squid, MS ISA, ...) in front of
your web servers (outside your network) and run the requests through
these servers.

So, when you're planning for down-time, you simply have to change
some rules to show the static "sorry, we're offline" message.


====================

You could set up a DNS failover solution (DNS
Made Easy provides this option), but depending on your TTL settings,
people won't likely get the updates except for longer outages. Of
course, you would also need an external server to host the maintenance
page.



Your best bet for instantaneous failover is to purchase a small
hosted server somewhere, with a static web page on it, and then use a
tool (like heartbeat in linux) to monitor when the main
server is unavailable, and have the secondary server take over its IP
address.



=================

Why not just provision a single
workstation/server with IIS displaying a single static maintenance page?
When you need to bring the web servers down you just bring up the
maintenance workstation and make sure it responds to the incoming web
requests...



Due to the simple static web page you could probably get away with a
small/medium workstation, even perhaps a laptop... You could probably
even get away with a Virtual Machine that sits offline until you need
it...



Seems like everything else is more work than necessary...


===============

I use haproxy for this exact setup. It is hosted on an external Linux
VPS. When the proxy system is able to successfully get the health check
page on the actual web server, that's what is served to the client.
When the health check fails, it serves a static page from an Apache
server local to the proxy VPS.



REFERENCE
http://serverfault.com/questions/23485/how-to-show-a-maintenance-page-for-website-when-our-network-is-down