curl-library
Re: DNS round-robin timeout
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
discriminated.
The way to "try them all at once" is basically the "happy eyeballs" approach:
http://tools.ietf.org/html/draft-ietf-v6ops-happy-eyeballs-07
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2012-01-17