Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions crates/pulsing-actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ path = "../../examples/rust/behavior_counter.rs"
name = "behavior_fsm"
path = "../../examples/rust/behavior_fsm.rs"

[[example]]
name = "http2_pool_expand"
path = "../../examples/rust/http2_pool_expand.rs"


[[bench]]
name = "tracing_overhead"
Expand Down
7 changes: 5 additions & 2 deletions crates/pulsing-actor/src/transport/http2/config.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//! HTTP/2 transport configuration.

use crate::error::Result;
use std::time::Duration;

#[cfg(feature = "tls")]
use super::tls::TlsConfig;
#[cfg(feature = "tls")]
use crate::error::Result;

/// HTTP/2 transport configuration.
#[derive(Debug, Clone)]
Expand All @@ -17,6 +18,8 @@ pub struct Http2Config {
pub connect_timeout: Duration,
pub request_timeout: Duration,
pub stream_timeout: Duration,
/// Initial per-host connection cap. The pool grows 2x on demand; this is
/// the starting point, not a hard ceiling.
pub max_connections_per_host: usize,
pub keepalive_interval: Option<Duration>,
pub keepalive_timeout: Duration,
Expand All @@ -41,7 +44,7 @@ impl Default for Http2Config {
connect_timeout: Duration::from_secs(5),
request_timeout: Duration::from_secs(30),
stream_timeout: Duration::from_secs(300),
max_connections_per_host: 10,
max_connections_per_host: 8,
keepalive_interval: Some(Duration::from_secs(30)),
keepalive_timeout: Duration::from_secs(10),
http2_prior_knowledge: true,
Expand Down
Loading
Loading