Round robin DNS and only one record?

Dustin Lovell dlovell at americafirst.com
Tue Dec 9 01:04:05 UTC 2008


Greetings all. Is it possible to set up BIND in such a way that if there are multiple A-records for a specific host, instead of returning all of them in response to a request and only changing the order with every second request, the server only returns one A-record, and varies that A-record with every second request?

A little background: I am preparing to retire an aging load-balancing appliance which does dynamic load balancing based on various criteria. In any given response to a request for an A-record, only one IP address is returned, thus:

;; ANSWER SECTION:
foo.test.com. 86400  IN      A       192.168.1.10

With every other request, the IP varies.

BIND's default behavior is to hand out both IPs, thus:

;; ANSWER SECTION:
foo.test.com. 86400  IN      A       192.168.1.10
foo.test.com. 86400  IN      A       192.168.1.11

With every other request, the IPs' order changes.

Certain browsers hitting our web application don't like having two A-records handed to them (I'm still in the process of figuring out why), and much prefer the first example above. We have two geographically dispersed locations, and too much traffic to realistically concentrate all of it to just one of the locations at present. Our load-balancer is near death, and I'm scrambling to replace it. I'm prepared to deal with the disaster-recovery scenario in which one of our locations becomes unavailable. My main objective is to replicate the behavior of our existing load balancer from the point of view of the end user, but ignore the dynamic aspect of it and use BIND to handle DNS.

Any help or advice would be greatly appreciated.

Best regards,
Dustin Lovell
America First Credit Union




More information about the bind-users mailing list