[mythtv] [mythtv-commits] mythtv commit: r25180 by beirdo
Ed W
lists at wildgooses.com
Thu Jul 1 16:39:22 UTC 2010
On 30/06/2010 18:29, Gavin Hurlbut wrote:
> On Wed, Jun 30, 2010 at 9:59 AM, Stuart Auchterlonie
> <stuarta at squashedfrog.net <mailto: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.
I think both sides have valid points
- On one side you have nscd (and windows has its own internal DNS cache,
unsure about osx) which means that the operating system should do a
short term cache after it used it's configured resolver to lookup the IP
- On the flip side we can see that Firefox has a local IP cache even
though it mainly runs on operating systems which are supposed to have
good quality local caching built-in already... From that I would
probably infer that someone there did some research and we might want to
consider that there are some reasons they decided to do this?
Additionally I note that QHostInfo states that it "uses small internal
60 second DNS Cache for performance purposes".
http://doc.qt.nokia.com/4.6/qhostinfo.html
Can we leverage QHostInfo and kill two birds with one stone?
Ed W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20100701/51c06c92/attachment.htm>
More information about the mythtv-dev
mailing list