cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [RMX:#] Re: round robin DNS without Ares only takes first IP

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 22 Apr 2005 11:17:55 +0200 (CEST)

On Fri, 22 Apr 2005, A Nonymous wrote:

> How frequently does libCurl ask the DNS server? In other words: How
> frequently is there a chance to get a different order?

Ah, very good point. I didn't think of the DNS cache.

It caches the entries in there for 60 seconds by default (and as long as the
entry is "in use") and during that period it will use the same address
order... Of course, as long as it re-uses the same connection it will also
remain using that same address (as then it won't even check its IP address
again).

I guess this calls for a shuffle function to use when using cached results.

Anyone up for making a patch?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-04-22