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

http/2, better rate limiting of downloads #14326

Closed
wants to merge 3 commits into from
Closed

Conversation

icing
Copy link
Contributor

@icing icing commented Jul 31, 2024

Set the initial stream window size to 64KB and increase that to the 10MB we used to start with on the first server reply, unless a rate limit is in effect.

Continuously monitory changes to the transfers rate limit and adjust the stream window size accordingly. max_recv_speed is a transfer propert that can be changed during processing by a callback.

The problem with the previous start of 10MB initially is that a server may push this amount into the TCP connection. If this is the only transfer on that connection, curl will just slowly consume this, possibly leading to timeouts on the server side. With more than one transfer, the unrestricted transfer will keep in pulling data and curl needs to take in all data, possibly 10MB, of the throttled stream then without restrictions.

@icing icing added the HTTP/2 label Jul 31, 2024
@github-actions github-actions bot added the tests label Jul 31, 2024
Set the initial stream window size to 64KB and increase that
to the 10MB we used to start with on the first server reply,
unless a rate limit is in effect.

Continously monitory changes to the transfers rate limit and
adjust the stream window size accordingly. `max_recv_speed`
is a transfer propert that can be changed during processing
by a callback.
@bagder bagder closed this in eb0a366 Aug 2, 2024
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