Skip to content
Merged
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
5 changes: 5 additions & 0 deletions crates/apollo_propeller/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ pub struct Config {
pub stream_protocol: StreamProtocol,
/// Maximum size of a message sent over the wire.
pub max_wire_message_size: usize,
/// Capacity of the bounded channel between each handler and the engine for inbound units.
/// Controls back-pressure: when the channel is full, the handler stops reading from the
/// network, causing yamux flow control to slow the remote peer.
pub inbound_channel_capacity: usize,
}

impl Default for Config {
Expand All @@ -23,6 +27,7 @@ impl Default for Config {
stale_message_timeout: Duration::from_secs(120),
stream_protocol: StreamProtocol::new("/propeller/0.1.0"),
max_wire_message_size: 1 << 20, // 1 MB
inbound_channel_capacity: 16,
}
}
}
Loading