Skip to content

http/2, better rate limiting of downloads - #14326

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

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

Conversation

@icing

@icing icing commented Jul 31, 2024 •

Copy link
Copy Markdown
Contributor

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
icing added 2 commits August 1, 2024 09:53
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