From 1c28671ecbde6029e62a105bec401322dbe3739c Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Tue, 23 Apr 2024 03:57:12 +1000 Subject: [PATCH] quic server: set initial window to PACKET_DATA_SIZE (#905) Start small so spam doesn't use too many resources. Then we grow the window once we figure out a connection's stake. --- streamer/src/quic.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/streamer/src/quic.rs b/streamer/src/quic.rs index 1129120f9a6db1..66537b1ad8dcc4 100644 --- a/streamer/src/quic.rs +++ b/streamer/src/quic.rs @@ -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));