[mythtv] [mythtv-commits] mythtv commit: r25180 by beirdo

Gavin Hurlbut gjhurlbu at gmail.com
Wed Jun 30 17:29:47 UTC 2010


On Wed, Jun 30, 2010 at 9:59 AM, Stuart Auchterlonie <
stuarta at squashedfrog.net> wrote:

> It is not up to the application to decide what resolvers to use,
> nor really is it up to the application to cache DNS requests.
>
> That is what the OS does for us.
> #1 - I completely disagree with and object to.
> #2 - I'm not keen on.
>

#2 is definitely what we should be doing.  Any application that does serious
web traffic (such as Firefox, Chrome, etc) benefits from not having to ask
the system for DNS lookups on every request when they are hammering the same
server.  I'm not saying that myth should specify the resolvers, that's up to
the owner of the box (I put the suggestion there for those who stumble upon
it and want a solution).  But we should be smarter with how we do requests.
 The icon importer pulls a *LOT* of images from the same server at times,
and it really could use an internal hash table.

Minimizing the needless use of the system resolver is a good thing,
especially when some setups have inordinately slow resolvers.  If you just
looked up that IP 100ms ago, there's no reason you should need to ask again.
 That's why DNS has TTLs on records. It's for the resolvers primarily, but
the applications could and in some cases SHOULD use them as well.  You know
the IP can't change in that time, so why ask again?  Of course, if people
would be willing to run BIND9 locally, it would do a much better job, but
within the icon importer specifically, we could create a temporary internal
cache which we dump once the icon importer closes.

Anyways, that's more a long-term thinking-ahead type of thing.  Currently we
have no such support, and things will suffer a bit with repeated hits to the
same server, especially when speed is desired.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20100630/9c38001e/attachment.htm>


More information about the mythtv-dev mailing list