Can SRV records get returned in order?

Kevin Darcy kcd at daimlerchrysler.com
Fri Apr 6 00:13:59 UTC 2007


Scott Moseman wrote:
> We are using rrset-order and sortlist under 9.3.0 to have our A
> records returned in a specified order.  I have been asked to try and
> have the SRV records returning in a specified order, since the dig
> queries appear to have them returned in round robin order.  Can this
> be done?  Or does the fact the SRV records have priority and weight
> settings nullify the need to have them returned in a specific order?
> If the priority and weight are the determining factors, why do they
> get returned to the client in a robin robin fashion?  Is it safe to
> assume that the client is *suppose* to collect all of the returned SRV
> records (not just the first one) and do the determination of which
> host to contact on their own?  I'm trying to make sure I understand
> what's to be expected with SRV records so I know that my DNS is
> working okay.
>
>   
I'm almost 100% positive that sortlist only applies to "address" (i.e. A 
or AAAA) records.

rrset-order, on the other hand, allows you to specify a record type. I 
would assume from that, that it is not restricted as far as record type.

The load-balancing/failover algorithm implemented by SRV is quite 
sophisticated and it would be preferable to use that rather than 
rrset-order. Using the native capabilities of SRV also releases you from 
the administrative burden of having to keep the same set of rrset-order 
definitions synchronized across all of your caching resolvers. There 
might be some obscure situations, however, where the SRV priority/weight 
values for multiple targets might need to be identical, but you want to 
perform some local sequencing/sorting/randomization. In that case a 
limited use of rrset-order might work. But the usefulness of it would be 
somewhat dependent on the behavior of the client, since I don't believe 
(without going back to the RFC and checking) that target-selection 
behavior is defined beyond the use of priority and weight fields...

                                                                         
                                 - Kevin



More information about the bind-users mailing list