Skip to content

Commit

Permalink
quic server: set initial window to PACKET_DATA_SIZE (#905)
Browse files Browse the repository at this point in the history
Start small so spam doesn't use too many resources. Then we grow the
window once we figure out a connection's stake.
  • Loading branch information
alessandrod authored Apr 22, 2024
1 parent 2770424 commit 1c28671
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions streamer/src/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ pub(crate) fn configure_server(
(QUIC_MAX_UNSTAKED_CONCURRENT_STREAMS.saturating_mul(2)) as u32;
config.max_concurrent_uni_streams(MAX_CONCURRENT_UNI_STREAMS.into());
config.stream_receive_window((PACKET_DATA_SIZE as u32).into());
config.receive_window(
(PACKET_DATA_SIZE as u32)
.saturating_mul(MAX_CONCURRENT_UNI_STREAMS)
.into(),
);
config.receive_window((PACKET_DATA_SIZE as u32).into());
let timeout = IdleTimeout::try_from(QUIC_MAX_TIMEOUT).unwrap();
config.max_idle_timeout(Some(timeout));

Expand Down

0 comments on commit 1c28671

Please sign in to comment.