-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Feature: Cache DNS requests #4108
Comments
The relevant DNS resolver should cache anyway, doesn't it? |
I've seen higher-than-expected CPU usage when using systemd-resolved, but could change to dnsmasq perhaps if this feature doesn't get implemented. |
Since we support |
If DNS performance is needed I suggest to switch to Unbound or similar caching DNS server. |
I think #4470 will essentially cover these requirements. A custom But I feel like we might close this because this requirement doesn't affect the large majority of users. DNS is sufficiently fast for most everyone. |
I don't understand why the system resolver isn't caching it, like why do we have to do the caching 🤔 More information / investigation / evidence would be useful here to be actionable. Am OK with closing it, we can reopen this if it turns out to be an issue within Caddy. |
When running Caddy as a reverse proxy with hostnames as the target, it appears to do a DNS request for each HTTP call.
It would be helpful it we could specify how long Caddy can cache a DNS result, something similar to
valid
as for example in http://nginx.org/en/docs/http/ngx_http_core_module.html#resolverI have found https://github.com/rs/dnscache which somewhat appears to be a drop in replacement for net.Resolver
The text was updated successfully, but these errors were encountered: