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

improved support for --limit-rate #11115

Closed
wants to merge 2 commits into from
Closed

Conversation

icing
Copy link
Contributor

@icing icing commented May 15, 2023

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
Copy link
Member

bagder commented May 18, 2023

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

@icing
Copy link
Contributor Author

icing commented May 19, 2023 via email

@bagder bagder closed this in f4b5c88 Jun 2, 2023
@bagder
Copy link
Member

bagder commented Jun 2, 2023

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