Prioritize A records?

Bill Larson bind9 at comcast.net
Fri Jan 28 00:25:30 UTC 2005


On Jan 27, 2005, at 8:44 AM, jim.mcnamara at gmail.com wrote:

> Hello all!
>
> I have a client with 2 servers running Bind 9.3.0, and they want to
> have websites located on 2 different machines. I know it is no problem
> for BIND to have multiple A records for the same domain name, but I am
> wondering if there is a way to force the use of the first of the
> addresses, much like the priority number for MX records. Ideally, I'd
> like to direct all http traffic to the intended server, but then have a
> second IP address in case the first server is down or overloaded. Could
> I do some thing like this -
>
> 7200  IN A  10 X.X.X.X
> 7200  IN A  20 Y.Y.Y.Y    ?
>
> Or will just listing them in that order direct all traffic to the first
> site?

Basically, no.  There is nothing in the DNS protocol that allows for 
"prioritization" of "A" records.  Now, there is "SRV" records that 
could be used for this purpose, if anyone ever coded this into a client 
application.

There is also "lbnamed", which is a Perl based DNS server which was 
written to direct users to specific machines based upon some service 
quality (normally the CPU utilization).  You could use "lbnamed" to 
direct users to a specific web server based upon some external 
information.  The basic information about "lbnamed" can be found at 
http://www.stanford.edu/~schemers/docs/lbnamed/lbnamed.html

Also take a look at 
http://www.isc.org/index.pl?/sw/bind/docs/bind-load-bal.php.  This is 
an article that is specifically written to address the type of solution 
your are proposing.

Bill Larson



More information about the bind-users mailing list