Web DNS: Redundant Web Server Question

I use GoDaddy to manage my webs DNS.  

If I host web sites at my office using IIS 6, have a static IP, and point the DNS to that IP, the name resolves very well.  My question, is:

How can I set up my web servers, so that in the event my office server goes down or is powered off, a person seeking my web pages will be redirected to another server at another location halfway across the country, that contains a similar copy of my webs?  

Is it possible to just add a second DNS entry, and if the first one is not found then it will automatically go to the second DNS which points to the other server at the other location?  What is the best way to accomlish this?  

Thanks!
kibbsAsked:
Who is Participating?
 
FilipZahradnikConnect With a Mentor Commented:
It's a nice idea, however you can't do fail-over using only DNS with web servers (there is a similar concept with mailserver MX records, where you can have as many entires as you want and they are tried sequentially).

At the heart of resolution of your host name to an IP address is a DNS A record. This basically says "www.example.com is 123.123.123.123". If you have multiple A records, the DNS server hands them out in a round-robin fashion. This can be used for load balancing, but for failover it does not work: if you had 2 servers and one goes down, half the clients would be sent to the downed server.

If your 2 servers are not at the same location, you need to throw some sort of monitoring into the mix that will check your web servers regularly and if one of them goes down, reconfigure your DNS to exclude that server.

Have a look at DNS2Go. They are an online DNS provider. You can delegate your domain's DNS to them. In the config, you can configure setting "When my domain goes offline, set IP to..."
0
 
omarfaridCommented:
The DNS solution will just add a 2nd IP for your web site and load will be almost balanced over the two servers.

You look for Layer for load balancers that would send the traffic to your prime web server if it is up, or redirect connections to other web server if the primary one is down / not reachable.

Also, if you have control over routing the traffic to the primary web server, then you may reroute traffic to the other web server. This require full control over your network traffic.
0
 
rafael_accCommented:
One idea (you need some scripting though; also, the actual failover is not going to happen immediately). When using the hosts file for dns resolution and a dns record is found in this file, the actual dns resolution process does not go through/to the dns server.

So, you could implement a script that does a continuous ping to the remote server and when it fails x times, then the script would edit the hosts file.

another soulution is to cluster the two servers.

Cheers,
R
0
 
kibbsAuthor Commented:
Thank you very much, Your answer was very clear and thorough.  I'm a little new to hosting these servers and we're putting together the best plan available so our business will minimize its down time.    Thanks again!
0
 
FilipZahradnikCommented:
Glad to help.
0
All Courses

From novice to tech pro — start learning today.