[NTLUG:Discuss] "Back up dns server"?

Wayne Walker wwalker at bybent.com
Tue Dec 4 23:41:49 CST 2007


To simplify:

1. All your DNS servers should _always_ return the same information for
all hosts.  (There are rare cases where this is not true, but m m's
problem is not one of these rare cases.)

2. Assuming that what m m really wants is failover to a second web server
when the first one goes down, there are a few solutions:

A. Have two web servers running all the time.  Have DNS always giving out
both addresses.  Web browsers will choose which one they go to at random.
This is the method little companies like Google and Amazon use:

	wwalker at elephant:~$ host www.google.com
	www.google.com is an alias for www.l.google.com.
	www.l.google.com has address 64.233.169.99
	www.l.google.com has address 64.233.169.147
	www.l.google.com has address 64.233.169.104
	www.l.google.com has address 64.233.169.103
	wwalker at elephant:~$ 

B. Change the IP address of the web server when some application notices
that the main web server is no longer available.  This is done by giving
the monitoring program access to the DNS zone files and to the DNS server
process (to restart or reload it).
	This is a poor solution for many reasons.
		1. DNS records have a "time to live" so people will still
		use bad data for whatever TTL (time to live) is on the
		DNS records.
		2. Web browsers cache DNS lookups, so even though you
		change the DNS data, everyone who has already been to your
		site will _never_ get forwarded to your backup site until
		they kill their browser (which some people never do).
		3. Giving external programs access to your DNS is a bad thing.

C. Set up a proxy server on the host at 4.5.6.7 and have it forward all
traffic to 1.2.3.4 until it sees 1.2.3.4 is down, then it points all
traffic to another web server (or itself).
	If 4.5.6.7 can be depended on to be up, use it and forget
	about the web server that is behind an unreliable firewall
	or connection.


-- 

Wayne Walker

# Code comments are lies waiting to happen

wwalker at bybent.com                    Do you use Linux?!
http://www.bybent.com                 Get Counted!  http://counter.li.org/
Perl - http://www.perl.org/           Perl User Groups - http://www.pm.org/
Jabber:  wwalker at jabber.gnumber.com   AIM:     lwwalkerbybent
IRC:     wwalker on freenode.net



More information about the Discuss mailing list