location of NS choosing algorithm

Mukund Sivaraman muks at isc.org
Wed Nov 5 11:41:33 UTC 2014

On Wed, Nov 05, 2014 at 05:50:54PM +0800, RunxiaWan wrote:
> Hi everyone,
> I want to know the implementation of NS selection algorithm in BIND system.
> Does anyone can help me to locate the function in the source of BIND9.9.5.
> where it is? The function name?

Various things influence this. You'll find part of this in
lib/dns/resolver.c.. part (the SRTT arithmetic) is in lib/dns/adb.c.

If you want a description of SRTT in general, see something like RFC793
that mentions it, though, in the context of TCP. BIND uses
ALPHA=0.7. BIND also ages SRTT of namesevers that it doesn't update SRTT
for by (old_srtt/512).

There is an old nameserver selection method (SRTT part) described in the
following document, but it isn't exactly what happens in BIND anymore:



More information about the bind-workers mailing list