Patch: rrset-roundrobin/minimal-responses

Hi all,

  This patch adds two features to Unbound-1.4.16.

rrset-roundrobin: yes|no (default: no)

  If yes, Unbound rotates RRSet order in response.
  This is almost same as Thijs Kinkhorst's implementation
  except that random number source is query-id.

minimal-responses: yes|no (default: no)

  If yes, Unbound doesn't insert authority/additional sections
  into response message when those sections are not required [1].
  This is similar to BIND9's minimal-responses
  or Google Public DNS behavior.

  Some points in favor:
  - reduces size of response significantly. in addition to bandwidth
    saving, it avoids TCP fallback all possible.
  - improves performance slightly. 5-7% speed-up
    at my Core 2 duo laptop.

[1] minimal-response process is activated when
      RCODE is NOERROR and
      QTYPE matches one of rrset type in answer section.
    (i.e. the response is positive answer)

(attachments)

roundrobin-minres-unbound-1.4.16.patch.gz (3.56 KB)

Hi Daisuke,

Hi all,

This patch adds two features to Unbound-1.4.16.

Excellent! The patch is very small, and contains threadsafe code.
The queryID is a very good way to make the rrset rotate, and removes
my concern for speed.

The minimal-responses positive_answer() routine is fixed to detect
wildcards, so that the NSEC/NSEC3 records for wildcards are not
removed from the authority section.

And added documentation in the manpage and example config. I did note
that minimal-responses is not RFC-conformant and may lose additional
data and thus necessitate roundtrips for clients that could have used
that additional data.

Thanks for this patch :slight_smile:

Best regards,
   Wouter