Cache DNS queries

Robert Collins robertc at robertcollins.net
Tue May 30 01:42:37 BST 2006


On Fri, 2006-05-26 at 16:05 -0500, John Arbash Meinel wrote:
> Hi everybody- (Hi Dr. Nick)
> 
> I was looking into the DNS querying issues because someone just
> submitted a bug on it. And I tracked down that each HTTP connection
> calls socket.getaddrinfo, which involves a full DNS query. Which turns
> out to be a major bottleneck.
> 
> So I wrote a plugin which just monkey patches socket.getaddrinfo so that
> it caches the results in a dictionary.

I think that that isn't a good solution, it will interact badly with
things like long lived servers that happen to import bzrlib.

We discussed this on IRC: we should solve this, curl has an API to do it
I believe, and urllib can do it if we derive an appropriate opener.

Cheers,
Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060530/e415dc15/attachment.pgp 


More information about the bazaar mailing list