You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to limit the rate of a stream? #1354
I'm using quiche to run a QUIC/H3 server. Sometimes we wanted to rate limit (say, at most 2Mbps) a stream (Http POST) from a client, is it possible with quiche?
Flow control is given back to the peer (in your example the client) when the application reads data via stream_recv. So you can rate limit a stream by managing your read rate in the application.
In this case I'm focusing on POST requests from the client, which uploads big files to the server. The client will also be using quiche. Is there something in quiche API to set max rate (via pacing maybe?) for the upload in the client?
Or did you mean any rate limit can only be done in application itself?
Closing as answered. On the receiving side, the application limits a stream's rate through how fast it reads, as LPardue described. On the sending side, Config::set_max_pacing_rate() caps the pacing rate of the whole connection rather than a single stream, and it only takes effect when the application sends at the times given in SendInfo.at.
Activity
LPardue commentedon Mar 2, 2023
Flow control is given back to the peer (in your example the client) when the application reads data via stream_recv. So you can rate limit a stream by managing your read rate in the application.
keepsimple1 commentedon Mar 3, 2023
In this case I'm focusing on
POSTrequests from the client, which uploads big files to the server. The client will also be usingquiche. Is there something inquicheAPI to set max rate (via pacing maybe?) for the upload in the client?Or did you mean any rate limit can only be done in application itself?
ghedo commentedon Nov 25, 2026
Closing as answered. On the receiving side, the application limits a stream's rate through how fast it reads, as LPardue described. On the sending side,
Config::set_max_pacing_rate()caps the pacing rate of the whole connection rather than a single stream, and it only takes effect when the application sends at the times given inSendInfo.at.