cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: DNS name resolution

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 2 Nov 2005 08:11:31 +0100 (CET)

On Tue, 1 Nov 2005, Russell Neufeld wrote:

> Yup. Running with libcurl built _without_ IPv6 support happily round robins.

Okay. That is proof enough for me to point finger at getaddrinfo() in glibc
2.3.5 (at least). Either that simply behaves wrongly, or I have misunderstood
something basic.

> Running with libcurl built *with* IPv6 support picks one IP address and uses
> it always. That was quick to find (although I guess you had already found
> it). Is there a bug for this already? Should I file one? We recommend to our
> customers that they use curl for http operations, but we've been having
> performance problems which we ultimately tracked down to this.

I figure the correct approach to this would be to

  1) write up a test case in a small simple C program

  2) approach the glibc team to get their opinion on the outcome of the test
     program

  3) depending on 2) file a bug report or fix libcurl

For the purpose of 1), I setup a host name 'bad10.haxx.se' that returns a set
of 5 IP numbers and in my tests it always returns the same one first with
getaddrinfo() but not with gethostbyname_r().

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