-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add response TTL settings #429
Comments
Making it configurable sounds good, but problem is that then config has to be propagated through podman or some environment variable since users don't directly call |
I stumbled over all the TTL-related issues in aardvark-dns yesterday and am trying to make sense of the story. What was the original idea behind a 24 hour TTL for an information that is potentially different on every lookup? This is the state Debian consumers will probably have to deal with for the next couple of years. There's nothing more recent than 1.4.0 on the roadmap as far as I can tell. The solution, to drop the TTL to one minute in 1.6.0, is another poor choice IMHO. The fact that "normal resolvers" wouldn't cache this information at all even came up in the discussion. Yet, it was decided to continue on this path. The motivation for this isn't entirely clear to me. Trying to solve performance issues here seems like very premature optimization and the approach just introduces new issues. This behavior must be in the control of the user. dnsmasq provides a
If anything, setting a non-zero TTL on aardvark-dns responses should be the challenge here, not fighting stale DNS caches. |
Containers can be be restarted with a different ip at any time so allowing caches here doesn't make much sense given the server is local and queries should be fast enough anyway. Fixes containers#429 Signed-off-by: Paul Holzinger <[email protected]>
Let's just set to 0, I do not see a strong reason why it would need to be cached. |
I know I'm new around these parts, but IMO it would make sense to keep this machinery in place with a default of 0 and allow people to configure it if they prefer the reduced load. (In some scenarios, even a cache of 1s would be a dramatic reduction.) I agree that 60s is way too long, so we could close this issue by just changing the default and leave the config option for a future change. |
Yes the problem is we do not have config file for aardvark-dns today, and if you (ab)use containers.conf we still would need a way to pass the option alone for podman -> netavark -> aardvark-dns so nothing easy. I was just looking for some easy fixes and looking at dig's reported query time I see 0 or 1 msec reported so I don't think there is a measurable overhead in normal scenarios. Of course if your application does thousands of these lookups per second then sure but at this point just fix you application to not do so many lookups. |
That would mean basically hardcoding a non-zero TTL into the app, which is certainly doable but not supported by most common (non-bespoke) apps. That said, the number of users that care about Podman networking load is probably pretty small and we can always bring this back later if we decide on a config method. I wasn't sure how we felt about putting more config in containers.conf, which is what I would have done. |
In #312 the response TTL was reduced drastically, but even 60 seconds is too long if it's being used for load balancing. I would like to be able to configure the TTL to something more like 5 seconds or even turn it off entirely.
The text was updated successfully, but these errors were encountered: