F23 System Wide Change: Default Local DNS Resolver

Simo Sorce simo at redhat.com
Tue Jun 2 18:01:36 UTC 2015


On Tue, 2015-06-02 at 19:51 +0200, Reindl Harald wrote:
> Am 02.06.2015 um 19:45 schrieb Simo Sorce:
> > On Mon, 2015-06-01 at 21:44 +0200, Reindl Harald wrote:
> >> it don't cache dns respones - try it out in your local network
> >> *client applications* may cache respones
> >>
> >> try it out in your local network
> >>
> >> * enter a non existing subdomain in firefox
> >> * add the hostname to your LAN nameserver
> >> * try again: firefox refuses
> >> * restart just firefox
> >> * it resolves without any delay
> >>
> >> a) that proves no systemwide cachae
> >> b) it proves with introduce a local systemdwide cache
> >>      you introduce a problem not existing before
> >>
> >
> > If you have nscd running glibc caches, so it is a matter of
> > configuration.
> 
> completly different topic
> 
> if i install a local resolver and start it it caches - so what - the 
> same for nscd which is not default, so you can't blame glibc because 
> caching of an additional package

If you knew what you are talkign about, you would know glibc's
documentation tells you their recommended way to deal with changing
resolv.conf files is to install and use nscd. So, yes, I can totally
blame glibc as nscd is aprt of glibc and they recommend you run it.

It is therefore the same topic.

> > The *only* reason why Firefox caches Names is because we do not have a
> > local dns caching resolver, so Firefox had to implement its own.
> >
> > If you had a local caching resolver Firefox could be changed to stop
> > caching on its own instead
> 
> tell me one reason why *any* application has to cache DNS results at 
> it's own - it don't matter at all if the machine has a local 
> resolver/cache or not, it's not the business of any user application

Because at least user applications need to be quick, and can't give user
a bad experience simply because the local DNS has gone out for lunch
(which happens pretty consistently in home routers and end-user ISP
netowrks), so apps end up doing what they can to avoid getting blamed by
the user, that turns out to be: cache DNS replies.
It doesn't matter whether you  like it or not, this is the reality and
we have to cope with reality not our desire of what reality "should" be.

By adding a local caching resolver by default, then apps *by default*
won't see DNS as a problem anymore and will stop implement half-ass-ed
caching. Ultimately leading to the result you want in your case, apps
will stop caching on their own, and when you remove the local resolver
in your setup you'll be happy top observe the flooding of DNS requests
w/o any application caching.
You should be happy about this change I guess :)

> and just because you have a local resolver firefox won't stop it's behavior

It can, w/o a local resolver FF developers will definitely keep caching
on their own, with a decent local resolver they can allow themselves to
disable their own and go back to rely on the system one, perhaps.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York



More information about the devel mailing list