Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rec: smarter priming #10177

Closed
omoerbeek opened this issue Mar 16, 2021 · 0 comments · Fixed by #10182
Closed

rec: smarter priming #10177

omoerbeek opened this issue Mar 16, 2021 · 0 comments · Fixed by #10182
Labels
Milestone

Comments

@omoerbeek
Copy link
Member

I think there is room for improvement wrt priming: currently both NS, A and AAAA records from the hints are inserted into the record cache with a TTL of 1000 hours in primeHints(). After that, SyncRes::getRootNS() is periodically called and resolves the root NS set (and will find it is in the cache most of the time), but no explicit queries are done for the A/AAAA's of the root servers and no cache entries for them are updated with facts learned from the net, at least not for the first 1000 hours.

I tested this with modifying root-addreses.hh to only contains a few correct IPs of NS and indeed, the wrong addresses were not updated in the cache.

It is probably better to move to an approach where the hints are used to learn the NS and their addresses from the net, and make sure those learned records are inserted into the cache. As a bonus I think it would be good to have the address records of the root servers not all have the same TTD as they have now, when refreshing them it will be possible to use the non-expired ones, and so no need to fall back to the hints most of the time.

  • Program: Recursor
  • Issue type: Feature request
@omoerbeek omoerbeek added the rec label Mar 16, 2021
@omoerbeek omoerbeek added this to the rec-5 milestone Mar 16, 2021
omoerbeek added a commit to omoerbeek/pdns that referenced this issue Mar 17, 2021
recorded in the cache.

Also make sure the root NS refresh happens more often if max-cache-ttl is low.
This is needed as the records no longer maintain the 1000 hours TTL.
In the existing setup, a reprime (with potential outdated info) was done at that
point in time since all root-server address records would expire at the same
time.

Lastly, fix a infinite (caught by depth check) recursion in getBestNSFromCache().

Fixes PowerDNS#10177.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant