Does Unbound Load-Balance Stub-Zone?

Hello,

I have Unbound running with a stub -zone pointed at an NSD server. It all works beautifully. I have gone through the documentation and do not see an answer to this question. Does Unbound load balance between addresses in a stub-zone? Meaning, if I had two NSD servers, and I put both IPs into a stub-zone - would Unbound load-balance between the two? I assume it would just use whichever server responded first, correct?

I ask because - if Unbound does not load-balance, I plan to use NGINX to load balance like so – Client > NGINX (LB) > Unbound Server > NGINX (LB) > NSD Server.

Thank you,

Steven Wills

Hi Steven,

I renamed that part of the documentation to make it easier to spot:
https://unbound.docs.nlnetlabs.nl/en/latest/reference/history/info-timeout-server-selection.html
There is quite some information there about how Unbound decides where to send a query.

Short version: Unbound does "load balance" based on the response time, prefers randomly picked fast servers in a certain time band (400msec) and keeps probing slow servers to see if they have improved their response time in the mean time.

Best regards,
-- George