-
Notifications
You must be signed in to change notification settings - Fork 15
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
Tweak cache settings #147
Comments
Hm, are we working around a Core issue here? What is the typical behavior of resolvers in this case? I am not against tweaking CoreDNS behavior for Core specific behavior, but I think we should be aware why we need to deviate from what is otherwise a seemingly fine default for other CoreDNS users. Otherwise we'll run into the same issue you run with your next question:
I am not aware of any specific reason for this setting. Looking at the git history this started off with very short caching settings in #12, and got relaxed to todays value in #48. Also it seems the fallback config has no maximum TTL, whereas the tempio one has. I think this is an unintended difference too. Since I don't know the exact reasons I am ok going default on all of those settings. |
I don't know. Afaict, Core is a dual-stack application which follows the Happy Eyeballs algorithm and requests There are options to disable that like the no-aaaa (since glibc 2.36) But that seems like it might have unintended side-effects and I haven't tested it myself.
Thanks for the code archology! Neither PR provides an explanation for setting the maximum TTLs and it might be unintentional given their titles "Offload config handling to plugin" and "Cleanup config". Going back to the default sounds like a reasonable plan. |
I think the current cache settings of
cache 600
could be changed a bit to address this issue:HA queries for
AAAA
records whenever a hostname is used in an integration: https://community.home-assistant.io/t/disable-all-these-useless-aaaa-requests/729016. In IPv4-only networks, it receives NODATA responses mostly without SOA records which are then only cached for 5 seconds. If there are several integrations which frequently poll data (e.g. to submit PV production data to a wallbox), this quickly adds up.In order to mitigate that, one could set a minimum TTL value, e.g. of 300 seconds:
Btw, what is the reason for reducing the maximum TTL to 600? The defaults are 3600 for NOERROR responses and 1800 for NXDOMAIN.
The text was updated successfully, but these errors were encountered: