dns round robin
Kevin Darcy
kcd at daimlerchrysler.com
Wed Sep 13 01:54:49 UTC 2006
neil wrote:
> Hi,
>
> I need a help in round robin technology. I have succesfully created the
> round robin and it is running fine but the problem is when someone do
> the nslookup <domain-name> it shows all the Ip addressess but i want
> that it show some of records and the records are in random order. Like
> when we do the nslookup google.com it shows 2 ip not all, whereas they
> all 40or 50 server in round robin. I have 10 server is round robin and
> i want to show only 3 or 4 when somebody make a nslookup. Anybody who
> have a knowledge of this kindly reply me ASAP.
>
Randomness, _per_se_ shouldn't be a problem. That's the BIND default
IIRC, so you should already be seeing randomness in the round robin
replies. Aren't you?
As for only showing some of the records, what does it matter whether it
shows 3 or 10? Applications will typically only try a few addresses
before giving up anyway. If you *really* want to do this, two BIND-based
approaches come to mind:
1) Set up different views for different combinations of the A records
(factoids: there are 120 possible combinations of 3 out of 10, 210
possible combinations of 4 out of 10) and then give them out as randomly
as possible, selecting on the client source address, or, if you can
configure multiple addresses on your nameservers, the query destination
address, or some combination of the two,
2) Have a script or program dynamically modify the RRset as load
conditions change
Neither of these approaches would give very good load balancing and/or
failover. For one thing, cache persistence would get in the way unless
you reduce the TTL on your records to anti-social levels. With option #1
the randomization is not driven at all by actual load/availability
conditions, so it wouldn't be able to direct traffic away from a down or
slow server, but on the other hand, option #2 would require that any
slaves replicate the relevant zone(s) very frequently, otherwise they
would lag behind the changes on the master.
You seem to be trying to make vanilla DNS function like a sophisticated
load-balancing/high-availability subsystem. It's not really designed for
that. That's why LB/HA vendors make a good living selling their goods,
to Google and everyone else that wants LB/HA above a certain minimal
threshold.
- Kevin
More information about the bind-users
mailing list