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 have example.com managed by a DNS server that associates it to some IP address (ip1), owned by a first web server where the full site is hosted.

I also have a secondary webserver (with ip2) that hosts a "backup" site, with only the public pages (homepage, about, etc.) and with some other pages (signup, login etc.) that just show a "under maintanance" webpage. This is a very inexpensive and not very powerful machine, that I'll just use to see some static pages in case the real site is down...instead of a sad connection error / site not found error.

Now I'd like to find/configure a service that automatically redirects example.com to ip2 when the webserver that own ip1 goes down. I know I could manually change the DNS records so that example.com points to ip2, but I'd like to find something that is very fast and automatic (so that I don't need to wake up at night to do that).

Any idea, suggestion, guidance? Thanks!

share|improve this question
add comment

1 Answer 1

Write a script that tests the return code html of your primary site (hosted on secondary server). In case of failure or timed out, you can change the associated record with the Route 53 API.

And do not forget to use a low TTL...

share|improve this answer
    
this might work...but it requires a custom script and a machine that's always running it. I'd prefer a ready-to-use service...I'm sure something must exist. Found yottaa so far, but haven't tried it yet. –  devguy Jun 15 '12 at 17:25
    
Ok, in this case, I recommend cloudflare.com. You will not even need your backup server. –  Yohann Jun 15 '12 at 17:34
add comment

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.