load sharing between networks

floyd

Verified User
Joined
Mar 29, 2005
Messages
6,251
I have two networks that I get service from. One has one group of ips and the other has another group. Each have there own router. Each router feeds the same switch which then goes out to the rest of the servers. This allows me to make use of both networks from all the servers.

Question: If I assign 2 different ip addresses, one from each network, how likely is it that the load will be balanced between the networks? If I have domain.com is it a 50% chance that a visitor will see the domain on a particular ip or is it more of a chance they will see it on one ip over another?

I know there will need to be custom configurations on the server hosting the domain and to DA. I am not worried about that right now. I just want to know if its worth my time trying it.
 
For that type of thing you really should route the IPs to the same location, IE: a load ballencer and let it do the distrobution.

Thanks,
Clint
 
Question: If I assign 2 different ip addresses, one from each network, how likely is it that the load will be balanced between the networks? If I have domain.com is it a 50% chance that a visitor will see the domain on a particular ip or is it more of a chance they will see it on one ip over another?
Floyd, This is load balancing via DNS, and you should probably read up on how DNS chooses which IP# to offer when you have multiple A records for the same domain. I don't remember the details or I'd tell you.

And it doesn't address that incoming traffic is generally close to nothing; it's only requests; it's the outgoing data that you'd probably need to balance, and whole books have been written about that. Really. For interesting advice join a list called simply the list or even more simply list; it was one of the first mailing lists used by Internet Service providers and there are still lots of incredibly intelligent people there, who've done exactly what you want to do.

Information here.

A word of advice, be friendly, be humble, and don't get involved in the offtopic discussions at least until you're fairly well known there; for example, the tag line is eat sushi regularly :) .

Clint, I'm not sure what you mean; he's trying to make sure the two networks get shared, routed to the same server. I don't see how your solution would help do that. Am I missing something?

Jeff
 
Thanks Jeff.

it's the outgoing data that you'd probably need to balance

The outgoing traffic has to go out on whatever network requested it. That is the way AT&T set it up. I tried to get them to change it so that outgoing traffic could go out either network no matter which network requested it but they screwed something up and I was down for a couple of hours. I don't want to chance that again. Its not that important.

I have multiple gateways set up on the server so that traffic can be directed to one or the other network depending on which network requested it. Since I cannot arbitrarily send out the traffic to either network then I have to somehow balance the requests.

I wonder if the Bind book would tell me something. I will let you know what I find out. But please if anybody else knows anything please contribute. This could be beneficial to others I am sure. I am just glad somebody has heard of what I am talking about. That means there is hope.
 
This is what I found. Its amazing what you can find when you figure out the right search terms. Thanks Jeff for 'DNS load balancing'

http://www.tenereillo.com/GSLBPageOfShame.htm#_ftnref4
The order that A records are returned by the most commonly deployed DNS server, BIND, is as follows. The first record is chosen at random. The remaining records are returned in a cyclic order. For example, if the ordered list is {1.1.1.1, 2.2.2.2, 3.3.3.3} the first response might be {2.2.2.2, 3.3.3.3, 1.1.1.1}, the next response to a subsequent client request, from a client that shares that name server, would be {3.3.3.3, 1.1.1.1, 2.2.2.2}.

http://www.ludd.luth.se/~kavli/BIND8/options.html
Other DNS resolvers and servers reorder the list differently, for example the Windows XP DNS cache will reorder a response such that any subnet-adjacent IP address is returned first. This paper does not attempt to provide a canonical list of such issues. It will suffice to say that, for a number of reasons, the order in an ordered list of A records cannot be expected to be preserved.

Also I think this needs to be in the Options in named.conf:

rrset-order {
order cyclic;
};

None of this has been tested yet. Maybe I will have time next week. Comments welcome on this topic.

(I know some are ignoring me in this forum but maybe they will see anyway. Notice I followed my own advice and Googled it instead of insisting that DA just give me the answer since they supplied Bind to me.)
 
Last edited:
Anybody know of a way to log which ip address is being used when a request is made?
 
In case anybody is interested so far my results of dns balancing are about 58/42 which I don't think is too bad.
 
Back
Top