round robin DNS without Ares only takes first IP
Date: Wed, 27 Apr 2005 16:17:49 +0200
Daniel Stenberg wrote:
> On Mon, 25 Apr 2005, A Nonymous wrote:
>> The following is an excerpt of hostip.c
>> Would you find it appropriate to check an option set in the session
>> data and randomize the entryies before assigning them in
>> dns->addr = addr; /* this is the address(es) */
> No, that's the place that stores the data in the cache.
> The right place would probably be in Curl_resolv() when a cached
> content is used and while the cache is locked and only if the returned
> address isn't in use by someone else (the ->inuse counter hints about
In my case several threads use this single address permanently.
What do you think of this:
We do a for-loop over the address chain in Curl_connecthost() in
connect.c (CVS-revision 1.130: line 789)
Alternatively I could count the number of addresses, choose the
starting address, jump to the head after reaching the tail and terminate
the loop when reaching the starting address again.
Unless a certain option is set the starting address will be the head itself.
looking forward to you comments
Received on 2005-04-27