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?  

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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". 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..."

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.

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!
Glad to help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.