On Mon, 11 Jan 2021 at 05:24, Daniel Stenberg <dan...@haxx.se> wrote:
> So what would your ideal solution to this in libcurl look like?

As discussed earlier, in my narrow perspective, the only sensible way
to apply connection timeout is to apply per connection attempt. I was
very surprised when I tested by setting the option to 3s but curl give
up after ~1.5s.
Other than that, I think Nginx options should cover most of the other
cases some people care about, especially the option to limit the
number of tries.

Of course, there are other perspectives about it too, but I can't
speak for others.
However, I can think of a way to introduce the new option without much turmoil.
It is to leave the current connection timeout option as is, but define
it with more clarity that it means overall connection timeout and is
shared between multiple connections. Then introduce another option
that defines as a timeout per connection. (Not sure about the name
yet.)

With only the old option set, curl can keep the old behavior this way;
on the other hand, it should help with the scenario of 20 IP addresses
you mentioned earlier when combined with the new option too.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to