Skip to main content

SEND_WINDOW

Constant SEND_WINDOW 

Source
pub const SEND_WINDOW: u64 = 10_000_000;
Expand description

Aggregate unacknowledged outbound stream data per connection, in bytes.

The mirror image of CONNECTION_RECEIVE_WINDOW, and the only bound on what this process buffers for a client that has stopped reading. 10 MB over the ~90 ms path RTT is about 889 Mbps against a measured peak of 177 Mbps, so it is nowhere near a throughput constraint.

Set to exactly what quinn already defaults to, so it changes not a byte on the wire today. It is pinned rather than inherited because upstream derives that default from STREAM_RWND, a private constant inside quinn’s TransportConfig::default with no stability guarantee, while the arithmetic above is quoted against it. Dependabot proposes cargo bumps weekly; a patch release that moved that constant would leave the documented numbers quietly false. Setting the value here makes them true by construction instead of by inheritance.

Note the asymmetry it leaves: 16 MiB of inbound credit granted against a 10 MB outbound cap, on a proxy whose traffic is mostly outbound. That is an accepted decision, not an oversight — lifting the outbound cap to match would add roughly 1.6 GiB of theoretical worst case across max_connections (256 by default) in exchange for throughput we cannot measure a need for.