How does Unbound prioritize upstream servers?

Started by dwasifar, January 29, 2021, 05:17:27 PM

Previous topic - Next topic
I have Unbound configured with two Cloudflare and two Google upstream DNS-over-TLS servers: 1.1.1.1@853, 1.0.0.1@853, 8.8.8.8@853, and 8.8.4.4@853, in that order.

Watching the logs, it seems to use all four of them, although it favors Cloudflare.  How does it choose?  Does it select randomly, or is there a logic to it that I'm not seeing?


Very interesting.  And smart, on the Unbound dev's behalf.  Looking at my logs, Unbound is favoring Cloudflare over Google more and more, which indicates Cloudflare is faster on the average.

The context of that github thread is amusing.  The dev is being pestered by a user to implement a function whereby all configured upstream servers are queried simultaneously and the first reply is used, the others discarded.  To me this is like ordering something online from four different vendors, keeping the first arrival, and returning the other three.  I'm not surprised the Unbound dev doesn't want to do it.