Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I will be running a dynamic web site and if the server ever is to stop responding, I'd like to failover to a static website that displays a "We are down for maintenance" page. I have been reading and I found that switching the DNS dynamically may be an option, but how quick will that change take place? And will everyone see the change immediately? Are there any better ways to failover to another server?

share|improve this question
    
what webserver on what OS? –  Nick Kavadias Nov 23 '09 at 7:21
3  
Using DNS as a failover mechanism is generally not recommended. DNS changes can take a long time to "go through" due to caching (anywhere from a minute to potentially days). There are much better ways to achieve what you are looking at, depending on how much control you have over the environment and the software being used? –  Keiran Holloway Nov 23 '09 at 8:04
    
I'm using a Windows server. (ASP.NET) –  mike Nov 23 '09 at 14:25
    
im confused. Do you want the ability to failover & keep the site running, or do you want to display a 'down for maintenance page' if the server is down? –  Nick Kavadias Nov 26 '09 at 14:10
    
Do you have shared session ? –  mezgani Jan 31 '10 at 17:28

6 Answers 6

You will find this wikipedia article very informative as it list a lot of software. Sadly I don't think that this is easy or cheaply done in Windows.

What you are wanting is something like this - Linux HA - Which, from what I understand, the servers talk to each, via internal ip's. If one goes done, then another machine from that cluster takes over control of that IP. MS has Microsoft Cluster Server (MSCS) and Microsoft's Windows Server Failover Clustering (WSFC) for Server 2008.

Your other option is to look at using VMWare to do it, which has the same sort of failover capabilities, but then you have to buy the licensing for vmware on top of everything else.

share|improve this answer

You can run another nginx as a proxy and let this machine manage the "failover". I'm also just starting with this kind of environment but it seems to become some kind of standard. :-)

share|improve this answer

You must have control of your DNS nameservers in order to specify a DNS failover service. I use a managed DNS service at ZoneEdit for my primary name server and list my hosts DNS as secondary name server. I use Zone Edit because they offer the failover service. DNSmadeeasy is another good option.

share|improve this answer
    
This looks interesting. I'm going to read up on their service some more to see if it will do what I need it to. –  mike Nov 23 '09 at 14:31
    
I spoke with someone at dnsmadeeasy and they said there may still be caching involved on the user side that may prevent the secondary server from being seen by everyone. This doesn't seem like it will achieve what I need it to. –  mike Nov 23 '09 at 15:18

You can do that with haproxy , wich is a very fast and reliable proxy. Furthermore , you can use a soft-stop trick like explained in section 4.1 of this document while doing maintenance on your server. Hope this Helps.

share|improve this answer
    
This is good stuff, but I don't believe that haproxy is supported on Windows??? –  mike Nov 23 '09 at 14:27
    
Well sometimes that's ok, as it should run on a separate server anyway - just look at it like an appliance and disregard the operating system? ^^ (think this site, which is technically very windows-centric, uses haproxy) –  Oskar Duveborn Apr 28 '10 at 13:13

when you use a proxy which is redirecting request in case of downtime, you only change your single point of failure (spof) from the webserver to the proxy. so you definitely need a cluster software (e.g. linux-ha or mscs as mentioned by Insanity5902) or cluster hardware (e.g. two load balancers with hot failover).

dns has, besides the caching problem you already found out, a distribution delay which can be up to 24 hours. but you can use dns to do loadbalancing be giving an fqdn two ore more ip adresses. but this will not do the trick for every situation. imagine the ip is up, but your webserver is not responding, then the client will timeout.

share|improve this answer

You may use a proxy for that nginx do the job for you, or may be a load balancer software tool for http protocol like pen. If you look for hardware solution, you can look at some appliances like radware.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.