Web Hosting Talk







View Full Version : DNS Question


kbc
12-23-2001, 04:57 AM
I have a domain.com hosted in Server A and Server B, with ns1 and ns2 pointing to Server A and ns3 pointing to another Server B. Both Servers are at the same provider.

The DNS info at the Registrar is ns1,ns2,ns3.

From what I know, it will only be redirected to Server B if Server A is inaccessible.

Question.
Under what condition that it be directed to Server B and IF both Server A & B are accessible?

If I remove ns3 for the DNS info at the Registrar, then Server A will be directed, otherwise, Server B will always be the first

I want the domain.com to be directed to Server B only if Server A is down. At the moment, my domain alway show the domain at Server B.

Please Help.

kbc

priyadi
12-23-2001, 09:09 AM
Um, it is not that simple. From your configuration right now, every client will get 67% chance to be redirected to server A and 33% chance to be directed to server B. The reason it always showed server B is because DNS resolver caches result.

What you really need is load balancing/ fail over solution. It should be simple as your servers are in the same provider.

bobcares
12-23-2001, 12:24 PM
Yes, Server B is only used as a backup ooption i.e. if A fails then go to B. You could try the load balancing idea if you want to keep optimised loads for the 2 servers.... :)

have a great day :)

regards
amar

bitserve
12-23-2001, 02:10 PM
Originally posted by bobcares
Yes, Server B is only used as a backup ooption i.e. if A fails then go to B. You could try the load balancing idea if you want to keep optimised loads for the 2 servers.... :)

have a great day :)

regards
amar

I think that you missed what priyadi was saying.

jks
12-23-2001, 06:31 PM
Originally posted by priyadi
Um, it is not that simple. From your configuration right now, every client will get 67% chance to be redirected to server A and 33% chance to be directed to server B.

Um, it is not that simple :-)

Actually the algorithm for deciding which server to query is a bit more complex. The exact algorithm is not specified by any RFC (but the RFC does show examples and lists a set of demands that the algorithm must live up to) - so it's more or less client specific.

Normally you would see that most queries goes to the server that responds quickets to clients. This means that if you have:

Server A = fast computer, responds quickly
Server B = old computer, loaded, responds slowly

And both are on the same network - then A will be queries the most often.

If A and B are in different parts of the world, for example one in Europe and one in the US - then the US clients will most likely go to the US server, and similar for the Europe clients that will go to the Europe server. It is however not 100% "secure" - as clients will sometimes choose the slow server, to check if it's quicker than it was before :-)

priyadi
12-24-2001, 12:36 AM
Originally posted by jks

Normally you would see that most queries goes to the server that responds quickets to clients. This means that if you have:

Server A = fast computer, responds quickly
Server B = old computer, loaded, responds slowly

And both are on the same network - then A will be queries the most often.

If A and B are in different parts of the world, for example one in Europe and one in the US - then the US clients will most likely go to the US server, and similar for the Europe clients that will go to the Europe server. It is however not 100% "secure" - as clients will sometimes choose the slow server, to check if it's quicker than it was before :-)

Yes, that would be true if DNS server is near the web server it is pointing to, however the original poster fails to mention if this is the case. In this case however, since both servers are on the same network, it doesn't make much difference in latency except in rare case when one server is too heavily loaded, with todays technology, a decent server can easily saturate a 10Mbps link. So IMO, 2:1 ratio in favor of server A is a good approximation to me, regardless of where the clients are coming from.

kbc
12-24-2001, 05:01 AM
The trouble is, most of time customers will not know which server they are on. Updating the website would be a nightmare, also constantly lost of mail/or the mail bound back a few days later would be frustrating. I could'nt imagine what would happen if database is involved.

Thank you,
kbc