Skip to content

Commit

Permalink
v1.18: quic server: set initial window to PACKET_DATA_SIZE (backport of
Browse files Browse the repository at this point in the history
solana-labs#905) (solana-labs#971)

quic server: set initial window to PACKET_DATA_SIZE (solana-labs#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 1c28671)

Co-authored-by: Alessandro Decina <alessandro.d@gmail.com>
  • Loading branch information
mergify[bot] and alessandrod authored Apr 24, 2024
1 parent a8c261b commit 8e9969c
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 @@ -85,11 +85,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 8e9969c

Please sign in to comment.