Skip to content

Is it possible to limit the rate of a stream? #1354

Done

Description

@keepsimple1

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?

Activity

  1. LPardue commented on Mar 2, 2023

    @LPardue
    Contributor

    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.

  2. keepsimple1 commented on Mar 3, 2023

    @keepsimple1
    ContributorAuthor

    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?

  3. added
    question
    area: streams
    on Nov 24, 2026
  4. ghedo commented on Nov 25, 2026

    @ghedo
    Member

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: streamsquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions