Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Setting connection timeout per host?
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Midnight Wonderer via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 10 Jan 2021 09:02:39 +0700
On Sun, 10 Jan 2021 at 05:45, Daniel Stenberg <daniel_at_haxx.se> wrote:
> *The server* or even "the URL". That's a single unity and there's a single
> timeout value, given in a time unit.
This is the key; it can also mean that these users are talking about
the typical case when there is a server per hostname. They probably
limit to that context. You may get more info if you bring up the DNS
retrying topic.
> - "I want to attempt to connect to each address of the host name for 10
> seconds each before we give up, which can take anywhere from 10 to 200 or more
> seconds"
We already have another kind of timeout in place, don't we?
Realistically speaking, anyone who put 20 addresses for a hostname
doesn't expect the client to try all 20 addresses; just a bunch of
them would suffice. This can be made an option with a sane default.
(like 4, or some number acquirable via statistic mean, or simply turn
off)
> So a 10 second timeout can legitimately take 200 seconds before it expires.
> That surely will surprise some users.
I should note that they also have "proxy_next_upstream_tries" option
to limit the number of tries. I never try the option myself, though.
From reading the document, I guess it is the same kind of number I
described earlier.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-10
Date: Sun, 10 Jan 2021 09:02:39 +0700
On Sun, 10 Jan 2021 at 05:45, Daniel Stenberg <daniel_at_haxx.se> wrote:
> *The server* or even "the URL". That's a single unity and there's a single
> timeout value, given in a time unit.
This is the key; it can also mean that these users are talking about
the typical case when there is a server per hostname. They probably
limit to that context. You may get more info if you bring up the DNS
retrying topic.
> - "I want to attempt to connect to each address of the host name for 10
> seconds each before we give up, which can take anywhere from 10 to 200 or more
> seconds"
We already have another kind of timeout in place, don't we?
Realistically speaking, anyone who put 20 addresses for a hostname
doesn't expect the client to try all 20 addresses; just a bunch of
them would suffice. This can be made an option with a sane default.
(like 4, or some number acquirable via statistic mean, or simply turn
off)
> So a 10 second timeout can legitimately take 200 seconds before it expires.
> That surely will surprise some users.
I should note that they also have "proxy_next_upstream_tries" option
to limit the number of tries. I never try the option myself, though.
From reading the document, I guess it is the same kind of number I
described earlier.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-10