cURL / Mailing Lists / curl-library / Single Mail


Re: DNS round-robin timeout

From: Daniel Stenberg <>
Date: Tue, 17 Jan 2012 19:48:49 +0100 (CET)

On Tue, 17 Jan 2012, Tim Bannister wrote:

> I like the pattern where there are up to N simultaneous connection attempts:
> initially one attempt to a random address from the pool, then after a
> timeout a second simultaneous attempt is started.
> Once a connection is established, cancel the other connections.
> With suitable parameters this is not unfair on the server side and allows
> the maximum possible time for a slow server to respond.
> However, it's too complicated to put into libcurl itself.

I agree that this approach would be useful and I actually don't think it is
too complicated to get used, just a bit of work to get done properly.

In addition to this, it could also resolve A and AAAA DNS names in parallel
before the connect "phase" is started so that neither IP protocol version gets

The way to "try them all at once" is basically the "happy eyeballs" approach:

List admin:
Received on 2012-01-17