number of forward-zones vs. performance

Hello,

over the last years I run unbound with zero or a small number of configures forward-zones.
Now, I was asked to configure 1-2 thousand forward-zones. Do I have to be concerned about performance degration?

Andreas

Hi Andreas,

I don't expect so but I am also not an operator of that many forward zones :slight_smile:
For sure you would need more memory.

I guess you would also need to manage/change said forwarding configuration and from Unbound 1.23.0, you can use
     unbound-control fast-reload
to pick up any changes from the configuration file(s) and apply them without service interaction.
You can read more about it in the unbound-control manpage also online [1].

Best regards,
-- Yorgos

[1] https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound-control.html#unbound-control-commands-fast-reload

In Unbound, forward-zones (or stub-zones) are stored as leaf elements of the unified red-black tree to maintain delegations for DNS tree.

Theoretically, setting up thousands of forward-zones can be considered the same situation that Unbound caches only thousands of delegation information and performance is unlikely to degrade, but performance may vary depending on usage, so you may want to do some performance testing.

A.Schulze via Unbound-users <unbound-users@lists.nlnetlabs.nl>:

answering myself: I'm impressed.

Today (after some testing) I enabled ~1000 forward-zone statements and configured DoT for upstream.
The systems, handling > 100 mio queries per day, did not collapse in the first minutes and even after some hours
there was *absolute no* performance impact visible in the system monitoring.

unbound seems well designed; thanks!

Andreas