curl-library
RE: Multi handle DNS cache entry expiration
Date: Tue, 2 Apr 2013 00:36:47 +0200 (CEST)
On Mon, 1 Apr 2013, Vladimir Grishchenko wrote:
> I'm not fully clear about your suggestion about upping the timeout.
> Currently our app only talks to one host only so yes, generally upping the
> timeout would be a sensible thing to do. However I would expect to see a
> gethostbyname call every 60 seconds by default but it sometimes takes longer
> when requests are going out back to back.
Ah, now I get what you're asking. Sorry, I didn't get it the first time!
> Can this have something to do with cached connections, as if there is a
> match for a given hostname/port and the connection is considering to be good
> no name lookup is attempted despite the fact the corresponding DNS cache
> entry is technically stale per configured CURLOPT_DNS_CACHE_TIMEOUT value?
Right. Cached existing connections will be re-used primarily and get used fine
without any new name resolve. So in a case where you re-use connections a lot
there can be a quite long time between name resolves.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-04-02