On Thu, Jul 22, 2004, Trevor Tregoweth wrote: > What i would like to know, is that when you specify an secondary DNS > for a web site, when the primary site goes down, how does the > secondary site take over........ > > for example, if the first dns server goes off line, can and how does > the secondary take over, i realise that you might have to copy the > whole web site over, and that's fine, but I'm not sure on how to make > the secondary site work, if that's possible....
You're conflating two different things there: secondary DNS and (as Steven pointed out) round-robin DNS. 1. Secondary DNS A server that has a copy of the DNS information only (not the website, not the mail delivery, just the pointers to servers) is called a primary or secondary DNS server. It will be listed as a nameserver for that domain clients automatically query other listed nameservers if the first one they try is down. Here's NS details for slug.org.au: $ host -t NS slug.org.au slug.org.au NS ns2.bur.st slug.org.au NS ns3.bur.st slug.org.au NS ns4.bur.st slug.org.au NS ns5.bur.st slug.org.au NS orgo.progsoc.uts.edu.au slug.org.au NS slug.progsoc.uts.edu.au slug.org.au NS sodium.indigo.net.au So there's seven (!) servers who you can potentially query. But they are DNS servers, they don't have copies of the slug.org.au website. You set up your primary and secondary DNS servers by telling your registrar about them usually, or informing the owner of your parent domain. They copy each other's information in a number of ways -- BIND has an auto-transfer mechanism in which one server is designated the "master" and the other "slaves" copy its information. 2. Round-robin DNS Web queries use the A record. slug.org.au has only one A record: $ host -t A slug.org.au slug.org.au A 138.25.7.4 If 138.25.7.4 can't be contacted, the SLUG website is down. hotmail, as you observed, has two: $ host -t A hotmail.com hotmail.com A 64.4.32.7 hotmail.com A 64.4.33.7 Steven already explained what happens -- clients choose one at random. This allows the load to be spread across a couple of machines/networks (it's not the only way to share load though). However, unlike with DNS queries clients won't automatically try the second one if the first one doesn't work, so you aren't creating a "fail-over". Assuming you don't have a mission critical site, the normal way to deal with failure is either: a) tough it out, accept a few hours downtime b) set up a second server on a different IP address and update the nameservers. (Not all clients will notice immediately because DNS can be cached.) -Mary -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
