Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl: add --parallel-immediate #4500

Closed
wants to merge 2 commits into from
Closed

Conversation

bagder
Copy link
Member

@bagder bagder commented Oct 17, 2019

Starting with this change when doing parallel transfers, without this
option set, curl will prefer to create new transfers multiplexed on an
existing connection rather than creating a brand new one.

--parallel-connect can be set to tell curl to prefer to use new
connections rather than to wait and try to multiplex.

libcurl-wise, this means that curl will set CURLOPT_PIPEWAIT by default
on parallel transfers.

Fixes #4494
Suggested-by: Tom van der Woerdt

@bagder bagder added cmdline tool HTTP/2 feature-window A merge of this requires an open feature window HTTP/3 h3 or quic related labels Oct 17, 2019
@jay
Copy link
Member

jay commented Oct 18, 2019

I'd call it something easier to understand for anyone reading a shell script like --parallel-nowait. But although that is technically accurate I find it kind of misleading because --IMHO-- strategically it's better to wait to multiplex than fan out, and I think by adding an option named nowait users are going to think, well, obviously I don't want to wait. Who wants to wait? I think the pipewait change was a good one and I'd skip this.

@bagder
Copy link
Member Author

bagder commented Oct 18, 2019

I'd call it something easier to understand for anyone reading a shell script

Yeah. Naming is hard. I'll think some more on this.

I think the pipewait change was a good one and I'd skip this.

I'm sorry, I don't understand this comment. This is the PR that introduces pipewait for the curl tool when doing parallel transfers...

@jay
Copy link
Member

jay commented Oct 19, 2019

I think the pipewait change was a good one and I'd skip this.

I'm sorry, I don't understand this comment. This is the PR that introduces pipewait for the curl tool when doing parallel transfers...

Oh I thought that already went in, I must have misread. I thought this: (void)curl_easy_setopt(per->curl, CURLOPT_PIPEWAIT, 1L);

On second thought I think an option to disable it could be useful for when there is prior knowledge of a server.

@bagder
Copy link
Member Author

bagder commented Oct 19, 2019

That's my thinking as well!

@bagder
Copy link
Member Author

bagder commented Nov 8, 2019

Alternative name suggestions for this option:

--parallel-preferred
--parallel-at-once
--parallel-directly

I think my personal preference is the last one here.

@jay
Copy link
Member

jay commented Nov 8, 2019

I don't like any of those but I still like --parallel-nowait, somewhat.

src/tool_help.c Outdated Show resolved Hide resolved
@bagder
Copy link
Member Author

bagder commented Nov 18, 2019

Out of the suggestions replied on the mailing list and as responses to my tweet, the only real contender that could work that I spotted is --parallel-immediate. I kind of like that.

@bagder bagder changed the title curl: add --parallel-connect curl: add --parallel-immediate Nov 18, 2019
@bagder
Copy link
Member Author

bagder commented Nov 18, 2019

I think I'm done bike-shedding this now. It is a rather minor option anyway and few people will want to use it. I rebased and force-pushed, will work on merging this soon.

Starting with this change when doing parallel transfers, without this
option set, curl will prefer to create new transfers multiplexed on an
existing connection rather than creating a brand new one.

--parallel-immediate can be set to tell curl to prefer to use new
connections rather than to wait and try to multiplex.

libcurl-wise, this means that curl will set CURLOPT_PIPEWAIT by default
on parallel transfers.

Suggested-by: Tom van der Woerdt
@bagder bagder removed the feature-window A merge of this requires an open feature window label Nov 21, 2019
@bagder bagder closed this in 215baa7 Nov 21, 2019
@bagder bagder deleted the bagder/parallel-connect branch November 21, 2019 16:09
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

Please expose CURLOPT_PIPEWAIT in the curl tool
3 participants