Unnecessary DNS queries in Konqueror (second part of BR#88855)

Thiago Macieira thiago.macieira at kdemail.net
Tue Oct 12 16:02:00 BST 2004


Stephan Kulow wrote:
>Am Tuesday 12 October 2004 15:03 schrieb Dawit A.:
>> I read the discussion in those bug reports. Would it not make more sense
>> to retrofit the KSocket* class with some sort of DNS caching instead ?
>> Perhaps
>
>I don't think every application should reproduce what's task of an
> operating system. And there _are_ solutions to do DNS caching at a lower
> level

As we were discussing yesterday on IRC, there are simple solutions to 
caching, including system-wide measures. One is nscd. Another is BIND's 
lwres. And a third is to have named itself run locally.

I am a lot more comfortable knowing the caching is done by the people who 
maintain the most widely used DNS server. :-)

As for the caching inside the resolver classes, it would happen on 
application-level. This means that each ioslave would still have to send 
out packets to resolve the hostname before caching the result. In the end, 
it would have no effect, given that HTTP connections are kept alive.

Dawit A. wrote:
>Yikes! Indeed that is what happens. It is completely nonsense. Shouldn't
>that be reported to whomever wrote those libs ?

The problem is: this is the expected behaviour. It has been that way for 
who-knows-how-long. We can report, but I don't expect to be even 
acknowledged as bug, at all.

There is one simple way of circumventing this problem: we add an ending dot 
to the hostname. If we lookup "kde.org." instead of "kde.org", no suffixes 
will be appended.
-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041012/22d9e1e7/attachment.sig>


More information about the kde-core-devel mailing list