Kluge delegation of a single host

Jim Reid jim at mpn.cp.philips.com
Tue Jun 22 09:29:07 UTC 1999


>>>>> "Christine" == Christine Tran <Christine.Tran at East.Sun.COM> writes:

    Christine> Gurus, We have a TIS BSD box running 4.9.3-P1.  I found
    Christine> this kluge and wonder if this is workable in 8.2.
    Christine> There's a server farm of 10 servers distributed
    Christine> geographically, they all answer to www.jelly.com.  They
    Christine> used Cisco Distributed Director (CDD) which figures out
    Christine> which of the servers are alive and return the closest
    Christine> IP to the querry source based on shortest route and
    Christine> trip time.  The kluge is in the zone file, which seems
    Christine> to delegate the *host* www.jelly.com to the CDD ( I
    Christine> have only seen delegation of a zone, not a single host
    Christine> but I don't see why it shouldn't work.)

    Christine> www.jelly.com.  IN NS CDD.jelly.com.  
    Christine> cdd.jelly.com.  IN A 1.2.3.4

    Christine> I have not seen this before, is it legal? and workable
    Christine> in BIND 8.2?  If not, can I mimic this dynamic load
    Christine> balancing within BIND somehow?

The RRs are certainly legal. However you might expect problems with
browsers who lookup www.jelly.com and get a SOA record returned
instead of an A or CNAME record.

As for load balancing, you get that for free in BIND8. The name server
will round-robin between N "equivalent" resource records:
	www.jelly.com. IN A 1.2.3.4
	www.jelly.com. IN A 1.2.3.5
	www.jelly.com. IN A 1.2.3.6
	www.jelly.com. IN A 1.2.3.7

The first lookup of www.jelly.com will get answers with the IP
addresses in the sequence 4, 5, 6 and 7. The next 5, 6, 7 and 4. And
so on. This will mean that on average a quarter of the browsers will
go to 1.2.3.4 because that was the first IP address in the answer
section of quarter of the replies. For the same reason, a quarter will
go to 1.2.3.5, another quarter to 1.2.3.6 and another to 1.2.3.7.
This gives crude but effective (and simple!) load balancing.

However it does not take account of the respective capacities or the
load on the 4 web servers (let's assume the addresses are on different
systems). And it doesn't care about network topology either. Some
users might go to 1.2.3.7 even though 1.2.3.4 was a better choice in
networking terms: bandwidth, hop count, etc. If you want/need that
functionality you probably need to use something like Cisco's
Distributed Director or lbnamed - a "load-balancing" name server
written in perl. Even so, for most circumstances the default
round-robin mechanism in BIND8 should be good enough.



More information about the bind-users mailing list