Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions streamer/src/nonblocking/stream_throttle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use {
},
};

/// Limit to 250K PPS
const MAX_STREAMS_PER_MS: u64 = 250;
/// Limit to 25K PPS
const MAX_STREAMS_PER_MS: u64 = 25;
const MAX_UNSTAKED_STREAMS_PERCENT: u64 = 20;
const STREAM_THROTTLING_INTERVAL_MS: u64 = 100;
pub const STREAM_STOP_CODE_THROTTLING: u32 = 15;
Expand Down Expand Up @@ -243,13 +243,13 @@ pub mod test {
Arc::new(StreamStats::default()),
MAX_UNSTAKED_CONNECTIONS,
));
// 25K packets per ms * 20% / 500 max unstaked connections
// 2500 packets per 100 ms * 20% / 500 max unstaked connections
assert_eq!(
load_ema.available_load_capacity_in_throttling_duration(
ConnectionPeerType::Unstaked,
10000,
),
10
1
);
}

Expand Down