|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
dns dual server question
If I have two servers with two different ip addresses and both servers are the same site, will both computers serve the site in tandem if I have the ns1 pointing at one ip and ns2 pointing at the other? How would this need to be set up to work?
|
|
#2
|
|||
|
|||
|
Nope, what you prooposed will not work for what you want to achieve.
Basically, the secondary DNS server is used only if the primary can't be reached (or unless another nameserver gets the secondary in its cache for some reason). You'll end up having all your DNS served out by the first server, and your first IP will take all the hits. You're looking at a load-balancing solution. For true load-balancing, you need the right equipment, which can get expensive. However, the cheap but not-so-perfect alternative, is round-robin DNS. Basically, the idea is that the servers IP's will get served by DNS in round-robin fashion, i.e. the first requested lookup will be the first DNS entry, the second requested lookup will be the second entry, and so forth and so on. You can have more than 2 entries, and each will get served in succession. In BIND 8, you simply add A records for each IP in your zone file like so: server1.yourdomain.com IN A 192.168.0.1 server2.yourdomain.com IN A 192.168.0.2 and so on. That's it. Reload zone, have a nice day. -Gary |
|
#3
|
|||||
|
|||||
|
Quote:
The above statements are complete and utter balderdash. That's NOT how name resolution works. When looking up a domain name, a caching name resolver will pick one of your nameservers at RANDOM. It doesn't know (or care) which is primary, secondary, tertiary or whatever -- it'll just pick one at random and query it. If no response comes back, then it'll pick another one and so on. This primary-secondary business only applies to your nameservers when you decide which one is master and which one(s) is slave. The rest of the outside world couldn't care less. Quote:
First statement is true. Second statement is not necessarily true -- you can google for Linux Load Balancing (http://lcic.org/load_balancing.html is one such project) and find some cheaper alternatives. For the record, we use a hardware solution at work though ![]() Quote:
I think you really mean: server.yourdomain.com IN A 192.168.0.1 server.yourdomain.com IN A 192.168.0.2 BTW this isn't really a round-robin solution because of caching. Let's say an AOL user decides to visit server.yourdomain.com. Their caching nameresolver will query your nameserver and receive a result (let's say 192.168.0.1). Now let's say another AOL user decides to visit server.yourdomain.com. The caching nameresolver is not going to requery your nameserver for a while. Instead, it returns the cached result from the first time around. The information is going to be cached for a while, so a lot of hits could go to one webserver rather than the other. Also see http://www.menandmice.com/online_do...oad.sharing.htm for some potential pitfalls. One more thing to note is that if the caching nameserver is dnscache (which is what we use at work) rather than BIND. See http://marc.theaimsgroup.com/?t=104483126300004&r=1&w=2
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month Last edited by Scorpions4ever : September 9th, 2003 at 03:25 PM. |
|
#4
|
|||
|
|||
|
two servers
So in other words the way I was talking about may work? Two servers, 2 different static ips, and have the dns pointing to each one. I already have one up and running fine with bind, would the other just be a identical bind except for the ip?
|
|
#5
|
||||
|
||||
|
Quote:
Yes. You'll need to do zone transfers every so often to keep them in sync.
__________________
Alex (http://www.alex-greg.com) |
|
#6
|
|||
|
|||
|
zone transfers?
What do you mean zone transfers?
|
|
#7
|
||||
|
||||
|
http://www.menandmice.com/online_do...ne.transfer.htm
They're a sucky way of synchronising DNS server information - unfortunately they're the only mechanism that BIND provides for doing this. BIND sucks, incidentally. You should look at djbdns - a far more secure and robust solution. |
|
#8
|
|||
|
|||
|
zone transfers
unfortunally I am using apache on xp, thats why I using bind. Is there some documentation somwhere on zone transfers? I still do not understand what your referring for me to do with the zone, I know how to set it up on the other computer to work with the new Ip once I get it.
|
|
#9
|
|||||
|
|||||
|
Quote:
Gah! OK, then. Quote:
Plenty: http://www.google.com/search?q=%22z...=utf-8&oe=utf-8 (the first item in the list is the djbdns site saying how poor zone transfers are - how ironic) Quote:
What about when you add another host on the master DNS server, or change a DNS record? How is the slave server supposed to know about this change? That's the problem that zone transfers have attempted to solve - the slaves check with the primaries for new data every so often. |
|
#10
|
|||
|
|||
|
oh
I guess I was thinking once I assigned the 2nd ip with network solutions and changed my zone file in 2nd computer to reflect the new ip that if the first one was busy it would go to 2nd ip address.
|
|
#11
|
||||
|
||||
|
Quote:
No, this is wrong - as explained by Scorpions4ever, resolvers will choose an authorative nameserver for your domain at random to query. |
|
#12
|
|||
|
|||
|
if it picks it at random
if it does that should it not work back and forth between them depending on which one it picks?
|
|
#13
|
|||
|
|||
|
reading your link
I am reading the link you posted, now it makes a little bit more sense
|
![]() |
| Viewing: Dev Shed Forums > System Administration > DNS > dns dual server question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|