[GH-ISSUE #2938] Recursor optimization: fetch one more NS record before sending original query #1095

Closed
opened 2026-03-16 01:35:53 +03:00 by kerem · 1 comment
Owner

Originally created by @divergentdave on GitHub (Apr 17, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2938

Since #2919, the first lookup that uses the original recursive query, plus ns_pool_for_referral(), plus the second lookup, act as an unrolling of the last loop of the QNAME minimization resolver algorithm, but with a tweak. We send the original query to the name server for the parent of the QNAME first, and then, if that returns a referral, we send the original query to the name server for QNAME itself. This results in suboptimal privacy, because we have not fully minimized queries to authoritative name servers, and whenever we query for names that are not at the apex of a zone, we make an extra query that does not cache well. If we instead queried for NS records all the way up to QNAME (or its parent, in the case of DS records), then those NS queries would be more cacheable, and we would only need to send one lookup with the original query.

Originally created by @divergentdave on GitHub (Apr 17, 2025). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2938 Since #2919, the first lookup that uses the original recursive query, plus `ns_pool_for_referral()`, plus the second lookup, act as an unrolling of the last loop of the QNAME minimization resolver algorithm, but with a tweak. We send the original query to the name server for the parent of the QNAME first, and then, if that returns a referral, we send the original query to the name server for QNAME itself. This results in suboptimal privacy, because we have not fully minimized queries to authoritative name servers, and whenever we query for names that are not at the apex of a zone, we make an extra query that does not cache well. If we instead queried for NS records all the way up to QNAME (or its parent, in the case of DS records), then those NS queries would be more cacheable, and we would only need to send one lookup with the original query.
kerem closed this issue 2026-03-16 01:35:59 +03:00
Author
Owner

@divergentdave commented on GitHub (Jun 11, 2025):

Done in #2983.

<!-- gh-comment-id:2964002693 --> @divergentdave commented on GitHub (Jun 11, 2025): Done in #2983.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1095
No description provided.