Skip to content

improved support for --limit-rate - #11115

Closed
icing wants to merge 2 commits into
curl:masterfrom
icing:h2-limit-rate
Closed

icing wants to merge 2 commits into
curl:masterfrom
icing:h2-limit-rate

Conversation

@icing

@icing icing commented May 15, 2023 •

Copy link
Copy Markdown
Contributor

The main change is to leave transfer loop when --limit-rate is in effect and that much data has been received. Mark the connection to simulate a POLLIN on next attempt, so buffered data will be picked up.

Then

  • adjust HTTP/2 stream window size to --limit-rate plus some slack to make the server observe the pacing we want. I observer still an initial burst of incoming data, since we announce 512KB window on connection setup. But afterwards, the window is decreased and only the rate-limited amount is being sent when the buffers get drained.
  • add h2/h3 test case to confirm behaviour on overall transfer duration

- leave transfer loop when --limit-rate is in effect and has
  been received
- adjust stream window size to --limit-rate plus some slack
  to make the server observe the pacing we want
- add test case to confirm behaviour
@icing icing changed the title h2 support for --limit-rate improved support for --limit-rate May 17, 2023
@bagder

bagder commented May 18, 2023

Copy link
Copy Markdown
Member

@icing: merge this now into 8.1.1 or wait until after you think?

@icing

icing commented May 19, 2023 via email •

Copy link
Copy Markdown
Contributor Author

@bagder bagder closed this in f4b5c88 Jun 2, 2023
@bagder

bagder commented Jun 2, 2023

Copy link
Copy Markdown
Member

Thanks!

bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- leave transfer loop when --limit-rate is in effect and has
  been received
- adjust stream window size to --limit-rate plus some slack
  to make the server observe the pacing we want
- add test case to confirm behaviour

Closes curl#11115
ptitSeb pushed a commit to wasix-org/curl that referenced this pull request Sep 25, 2023
- leave transfer loop when --limit-rate is in effect and has
  been received
- adjust stream window size to --limit-rate plus some slack
  to make the server observe the pacing we want
- add test case to confirm behaviour

Closes curl#11115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants