Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
4942: Adjusted binary port default config settings r=EdHastingsCasperAssociation a=zajko

Lowered the "default" number of max concurrent binary port connections to `5` and bumped `qps_limit` on binary port to 110. These numbers should be revised on a case-by-case basis of each node deployment.

Co-authored-by: Jakub Zajkowski <[email protected]>
  • Loading branch information
casperlabs-bors-ng[bot] and Jakub Zajkowski authored Oct 30, 2024
2 parents 3e674fc + 8be35f9 commit 7606e94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions node/src/components/binary_port/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const DEFAULT_ADDRESS: &str = "0.0.0.0:0";
/// Default maximum message size.
const DEFAULT_MAX_MESSAGE_SIZE: u32 = 4 * 1024 * 1024;
/// Default maximum number of connections.
const DEFAULT_MAX_CONNECTIONS: usize = 16;
const DEFAULT_MAX_CONNECTIONS: usize = 5;
/// Default maximum number of requests per second.
const DEFAULT_MAX_QPS: usize = 100;
const DEFAULT_QPS_LIMIT: usize = 110;

/// Binary port server configuration.
#[derive(Clone, DataSize, Debug, Deserialize, Serialize)]
Expand Down Expand Up @@ -46,7 +46,7 @@ impl Config {
allow_request_speculative_exec: false,
max_message_size_bytes: DEFAULT_MAX_MESSAGE_SIZE,
max_connections: DEFAULT_MAX_CONNECTIONS,
qps_limit: DEFAULT_MAX_QPS,
qps_limit: DEFAULT_QPS_LIMIT,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions resources/local/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ allow_request_speculative_exec = false
max_message_size_bytes = 4_194_304

# Maximum number of connections to the server.
max_connections = 16
max_connections = 5

# The global max rate of requests (per second) before they are limited.
# The implementation uses a sliding window algorithm.
qps_limit = 100
qps_limit = 110

# ==============================================
# Configuration options for the REST HTTP server
Expand Down
6 changes: 3 additions & 3 deletions resources/production/config-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ allow_request_speculative_exec = false
max_message_size_bytes = 4_194_304

# Maximum number of connections to the server.
max_connections = 16
max_connections = 5

# The global max rate of requests (per second) before they are limited.
# The implementation uses a sliding window algorithm.
qps_limit = 10
qps_limit = 110

# ==============================================
# Configuration options for the REST HTTP server
Expand All @@ -345,7 +345,7 @@ address = '0.0.0.0:8888'

# The global max rate of requests (per second) before they are limited.
# Request will be delayed to the next 1 second bucket once limited.
qps_limit = 10
qps_limit = 100

# Specifies which origin will be reported as allowed by REST server.
#
Expand Down

0 comments on commit 7606e94

Please sign in to comment.