How does bind 9 choose a forwarder when multiple are configured?
If I have a dns view that has four forwarders configured, how does bind choose which forwarder to use? And what happens if the first one chosen does not respond in a timely manner? I can't find any info in the bind 9 documentation on this.
Does bind try the first forwarder and if no response go to the second one and so on? Or maybe bind knows which forwarder is closest. I need to know how bind 9 decides which forward to use so I can make the appropriate design decisions.
Solution 1:
Bind uses a methodology named "smoothed round-trip time". Basically it chooses the fastest responding server, and prefers using that one. From time to time, bind queries the other servers in order to update the SRTT values, which allows servers to "catch up", but also decays the chance of slower servers to become the primary forwarder. This also this means that a (small) portion of your queries will use the slowest server, no matter what.
If a server is not responding, another one is tried, and the non-responsive server's SRTT value gets incremented.