From 579f540446d7370f10e4f1d9bfcb90c7685451ac Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:27:23 -0600 Subject: [PATCH] v1.17: quic server: set initial window to PACKET_DATA_SIZE (backport of #905) (#970) 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. (cherry picked from commit 1c28671ecbde6029e62a105bec401322dbe3739c) Co-authored-by: Alessandro Decina --- 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 1ac2be7f7ed0aa..557ffa0977ea35 100644 --- a/streamer/src/quic.rs +++ b/streamer/src/quic.rs @@ -79,11 +79,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));