diff --git a/linkerd/app/admin/src/stack.rs b/linkerd/app/admin/src/stack.rs index fa7658088d..910341f65b 100644 --- a/linkerd/app/admin/src/stack.rs +++ b/linkerd/app/admin/src/stack.rs @@ -128,7 +128,7 @@ impl Config { move |t: &Http| { http::ServerParams { version: t.version, - h2: Default::default(), + http2: Default::default(), drain: drain.clone(), } } diff --git a/linkerd/app/core/src/config.rs b/linkerd/app/core/src/config.rs index 392588abbe..a5d2f45ebc 100644 --- a/linkerd/app/core/src/config.rs +++ b/linkerd/app/core/src/config.rs @@ -10,7 +10,7 @@ use std::time::Duration; pub struct ServerConfig { pub addr: DualListenAddr, pub keepalive: Keepalive, - pub h2_settings: h2::Settings, + pub http2: h2::ServerParams, } #[derive(Clone, Debug)] @@ -18,8 +18,8 @@ pub struct ConnectConfig { pub backoff: ExponentialBackoff, pub timeout: Duration, pub keepalive: Keepalive, - pub h1_settings: h1::PoolSettings, - pub h2_settings: h2::Settings, + pub http1: h1::PoolSettings, + pub http2: h2::ClientParams, } #[derive(Clone, Debug)] diff --git a/linkerd/app/core/src/control.rs b/linkerd/app/core/src/control.rs index adee7c9a7b..856c0fedc2 100644 --- a/linkerd/app/core/src/control.rs +++ b/linkerd/app/core/src/control.rs @@ -128,7 +128,7 @@ impl Config { .push(tls::Client::layer(identity)) .push_connect_timeout(self.connect.timeout) .push_map_target(|(_version, target)| target) - .push(self::client::layer(self.connect.h2_settings)) + .push(self::client::layer(self.connect.http2)) .push_on_service(svc::MapErr::layer_boxed()) .into_new_service(); @@ -330,7 +330,6 @@ mod client { svc, tls, transport::{Remote, ServerAddr}, }; - use linkerd_proxy_http::h2::Settings as H2Settings; use std::net::SocketAddr; #[derive(Clone, Hash, Debug, Eq, PartialEq)] @@ -368,11 +367,11 @@ mod client { // === impl Layer === pub fn layer( - settings: H2Settings, - ) -> impl svc::Layer> + Copy + h2: http::h2::ClientParams, + ) -> impl svc::Layer> + Clone where http::h2::Connect: tower::Service, { - svc::layer::mk(move |mk_conn| http::h2::Connect::new(mk_conn, settings)) + svc::layer::mk(move |mk_conn| http::h2::Connect::new(mk_conn, h2.clone())) } } diff --git a/linkerd/app/inbound/src/http/router.rs b/linkerd/app/inbound/src/http/router.rs index 76274a4abb..5c151e9fd0 100644 --- a/linkerd/app/inbound/src/http/router.rs +++ b/linkerd/app/inbound/src/http/router.rs @@ -94,8 +94,8 @@ impl Inbound { .check_service::() .push_map_target(|(_version, target)| target) .push(http::client::layer( - config.proxy.connect.h1_settings, - config.proxy.connect.h2_settings, + config.proxy.connect.http1, + config.proxy.connect.http2.clone(), )) .check_service::() .push_on_service(svc::MapErr::layer_boxed()) diff --git a/linkerd/app/inbound/src/http/server.rs b/linkerd/app/inbound/src/http/server.rs index d33f91cccb..06149d2be8 100644 --- a/linkerd/app/inbound/src/http/server.rs +++ b/linkerd/app/inbound/src/http/server.rs @@ -112,7 +112,7 @@ impl Inbound { HSvc::Future: Send, { self.map_stack(|config, rt, http| { - let h2 = config.proxy.server.h2_settings; + let h2 = config.proxy.server.http2.clone(); let drain = rt.drain.clone(); http.check_new_service::>() @@ -120,7 +120,7 @@ impl Inbound { .check_new_new_service::>() .push(http::NewServeHttp::layer(move |t: &T| http::ServerParams { version: t.param(), - h2, + http2: h2.clone(), drain: drain.clone(), })) .check_new_service::() diff --git a/linkerd/app/inbound/src/test_util.rs b/linkerd/app/inbound/src/test_util.rs index 218b994e94..efd962300a 100644 --- a/linkerd/app/inbound/src/test_util.rs +++ b/linkerd/app/inbound/src/test_util.rs @@ -59,7 +59,7 @@ pub fn default_config() -> Config { server: config::ServerConfig { addr: DualListenAddr(([0, 0, 0, 0], 0).into(), None), keepalive: Keepalive(None), - h2_settings: h2::Settings::default(), + http2: h2::ServerParams::default(), }, connect: config::ConnectConfig { keepalive: Keepalive(None), @@ -70,11 +70,11 @@ pub fn default_config() -> Config { 0.1, ) .unwrap(), - h1_settings: h1::PoolSettings { + http1: h1::PoolSettings { max_idle: 1, idle_timeout: Duration::from_secs(1), }, - h2_settings: h2::Settings::default(), + http2: h2::ClientParams::default(), }, max_in_flight_requests: 10_000, detect_protocol_timeout: Duration::from_secs(10), diff --git a/linkerd/app/outbound/src/http/endpoint.rs b/linkerd/app/outbound/src/http/endpoint.rs index 597c40d74c..b829b4aed7 100644 --- a/linkerd/app/outbound/src/http/endpoint.rs +++ b/linkerd/app/outbound/src/http/endpoint.rs @@ -54,9 +54,7 @@ impl Outbound { { self.map_stack(|config, _, inner| { let config::ConnectConfig { - h1_settings, - h2_settings, - .. + http1, ref http2, .. } = config.proxy.connect; // Initiates an HTTP client on the underlying transport. Prior-knowledge HTTP/2 @@ -65,7 +63,7 @@ impl Outbound { svc::stack(inner.into_inner().into_service()) .check_service::>() .push_map_target(|(version, inner)| Connect { version, inner }) - .push(http::client::layer(h1_settings, h2_settings)) + .push(http::client::layer(http1, http2.clone())) .push_on_service(svc::MapErr::layer_boxed()) .check_service::() .into_new_service() diff --git a/linkerd/app/outbound/src/http/server.rs b/linkerd/app/outbound/src/http/server.rs index e89b678694..91e150aa35 100644 --- a/linkerd/app/outbound/src/http/server.rs +++ b/linkerd/app/outbound/src/http/server.rs @@ -9,7 +9,7 @@ pub(crate) struct ServerRescue { #[derive(Clone, Debug)] pub struct ExtractServerParams { - h2: http::h2::Settings, + h2: http::h2::ServerParams, drain: drain::Watch, } @@ -86,7 +86,7 @@ impl Outbound { http.unlift_new() .push(svc::ArcNewService::layer()) .push(http::NewServeHttp::layer(ExtractServerParams { - h2: config.proxy.server.h2_settings, + h2: config.proxy.server.http2.clone(), drain: rt.drain.clone(), })) }) @@ -194,7 +194,7 @@ where fn extract_param(&self, t: &T) -> http::ServerParams { http::ServerParams { version: t.param(), - h2: self.h2, + http2: self.h2.clone(), drain: self.drain.clone(), } } diff --git a/linkerd/app/outbound/src/ingress.rs b/linkerd/app/outbound/src/ingress.rs index 8744183d7d..06534f73fd 100644 --- a/linkerd/app/outbound/src/ingress.rs +++ b/linkerd/app/outbound/src/ingress.rs @@ -301,11 +301,11 @@ impl Outbound { http.check_new_service::, http::Request<_>>() .unlift_new() .push(http::NewServeHttp::layer({ - let h2 = config.proxy.server.h2_settings; + let h2 = config.proxy.server.http2.clone(); let drain = rt.drain.clone(); move |http: &Http| http::ServerParams { version: http.version, - h2, + http2: h2.clone(), drain: drain.clone() } })) diff --git a/linkerd/app/outbound/src/protocol.rs b/linkerd/app/outbound/src/protocol.rs index 4dec140bee..b9904cd42e 100644 --- a/linkerd/app/outbound/src/protocol.rs +++ b/linkerd/app/outbound/src/protocol.rs @@ -47,13 +47,13 @@ impl Outbound { let opaq = self.clone().into_stack(); let http = self.with_stack(http).map_stack(|config, rt, stk| { - let h2 = config.proxy.server.h2_settings; + let h2 = config.proxy.server.http2.clone(); let drain = rt.drain.clone(); stk.unlift_new() .push(http::NewServeHttp::layer(move |t: &Http| { http::ServerParams { version: t.version, - h2, + http2: h2.clone(), drain: drain.clone(), } })) diff --git a/linkerd/app/outbound/src/test_util.rs b/linkerd/app/outbound/src/test_util.rs index 09ba46a77b..64d2f04afc 100644 --- a/linkerd/app/outbound/src/test_util.rs +++ b/linkerd/app/outbound/src/test_util.rs @@ -26,7 +26,7 @@ pub(crate) fn default_config() -> Config { server: config::ServerConfig { addr: DualListenAddr(([0, 0, 0, 0], 0).into(), None), keepalive: Keepalive(None), - h2_settings: h2::Settings::default(), + http2: h2::ServerParams::default(), }, connect: config::ConnectConfig { keepalive: Keepalive(None), @@ -37,11 +37,11 @@ pub(crate) fn default_config() -> Config { 0.1, ) .unwrap(), - h1_settings: h1::PoolSettings { + http1: h1::PoolSettings { max_idle: 1, idle_timeout: Duration::from_secs(1), }, - h2_settings: h2::Settings::default(), + http2: h2::ClientParams::default(), }, max_in_flight_requests: 10_000, detect_protocol_timeout: Duration::from_secs(3), diff --git a/linkerd/app/src/env.rs b/linkerd/app/src/env.rs index 2718e97351..45582ac388 100644 --- a/linkerd/app/src/env.rs +++ b/linkerd/app/src/env.rs @@ -425,21 +425,13 @@ pub fn parse_config(strings: &S) -> Result ); let dst_profile_networks = parse(strings, ENV_DESTINATION_PROFILE_NETWORKS, parse_networks); - let initial_stream_window_size = parse(strings, ENV_INITIAL_STREAM_WINDOW_SIZE, parse_number); - let initial_connection_window_size = - parse(strings, ENV_INITIAL_CONNECTION_WINDOW_SIZE, parse_number); - let tap = parse_tap_config(strings); - let h2_settings = h2::Settings { - initial_stream_window_size: Some( - initial_stream_window_size?.unwrap_or(DEFAULT_INITIAL_STREAM_WINDOW_SIZE), - ), - initial_connection_window_size: Some( - initial_connection_window_size?.unwrap_or(DEFAULT_INITIAL_CONNECTION_WINDOW_SIZE), - ), - ..Default::default() - }; + let initial_stream_window_size = parse(strings, ENV_INITIAL_STREAM_WINDOW_SIZE, parse_number)? + .unwrap_or(DEFAULT_INITIAL_STREAM_WINDOW_SIZE); + let initial_connection_window_size = + parse(strings, ENV_INITIAL_CONNECTION_WINDOW_SIZE, parse_number)? + .unwrap_or(DEFAULT_INITIAL_CONNECTION_WINDOW_SIZE); let dst_profile_suffixes = dst_profile_suffixes? .unwrap_or_else(|| parse_dns_suffixes(DEFAULT_DESTINATION_PROFILE_SUFFIXES).unwrap()); @@ -481,7 +473,13 @@ pub fn parse_config(strings: &S) -> Result let server = ServerConfig { addr, keepalive, - h2_settings, + http2: h2::ServerParams { + flow_control: Some(h2::FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }), + ..Default::default() + }, }; let discovery_idle_timeout = outbound_discovery_idle_timeout?.unwrap_or(DEFAULT_OUTBOUND_DISCOVERY_IDLE_TIMEOUT); @@ -502,8 +500,14 @@ pub fn parse_config(strings: &S) -> Result OUTBOUND_CONNECT_BASE, DEFAULT_OUTBOUND_CONNECT_BACKOFF, )?, - h2_settings, - h1_settings: h1::PoolSettings { + http2: h2::ClientParams { + flow_control: Some(h2::FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }), + ..Default::default() + }, + http1: h1::PoolSettings { max_idle, idle_timeout: connection_pool_timeout .unwrap_or(DEFAULT_OUTBOUND_HTTP1_CONNECTION_POOL_IDLE_TIMEOUT), @@ -563,7 +567,13 @@ pub fn parse_config(strings: &S) -> Result let server = ServerConfig { addr, keepalive, - h2_settings, + http2: h2::ServerParams { + flow_control: Some(h2::FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }), + ..Default::default() + }, }; let discovery_idle_timeout = inbound_discovery_idle_timeout?.unwrap_or(DEFAULT_INBOUND_DISCOVERY_IDLE_TIMEOUT); @@ -584,8 +594,14 @@ pub fn parse_config(strings: &S) -> Result INBOUND_CONNECT_BASE, DEFAULT_INBOUND_CONNECT_BACKOFF, )?, - h2_settings, - h1_settings: h1::PoolSettings { + http2: h2::ClientParams { + flow_control: Some(h2::FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }), + ..Default::default() + }, + http1: h1::PoolSettings { max_idle, idle_timeout: connection_pool_timeout, }, @@ -758,7 +774,13 @@ pub fn parse_config(strings: &S) -> Result server: ServerConfig { addr: DualListenAddr(admin_listener_addr, None), keepalive: inbound.proxy.server.keepalive, - h2_settings, + http2: h2::ServerParams { + flow_control: Some(h2::FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }), + ..Default::default() + }, }, // TODO(ver) Currently we always enable profiling when the pprof feature @@ -817,7 +839,13 @@ pub fn parse_config(strings: &S) -> Result config: ServerConfig { addr: DualListenAddr(addr, None), keepalive: inbound.proxy.server.keepalive, - h2_settings, + http2: h2::ServerParams { + flow_control: Some(h2::FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }), + ..Default::default() + }, }, }) .unwrap_or(super::tap::Config::Disabled); diff --git a/linkerd/app/src/tap.rs b/linkerd/app/src/tap.rs index 81906122a7..c9f5d6cee5 100644 --- a/linkerd/app/src/tap.rs +++ b/linkerd/app/src/tap.rs @@ -13,6 +13,7 @@ use std::{collections::HashSet, pin::Pin}; use tower::util::{service_fn, ServiceExt}; #[derive(Clone, Debug)] +#[allow(clippy::large_enum_variant)] pub enum Config { Disabled, Enabled { diff --git a/linkerd/proxy/http/src/client.rs b/linkerd/proxy/http/src/client.rs index e751bba733..e081f2054c 100644 --- a/linkerd/proxy/http/src/client.rs +++ b/linkerd/proxy/http/src/client.rs @@ -28,7 +28,7 @@ pub enum Settings { pub struct MakeClient { connect: C, h1_pool: h1::PoolSettings, - h2_settings: h2::Settings, + h2_params: h2::ClientParams, _marker: PhantomData, } @@ -40,12 +40,12 @@ pub enum Client { pub fn layer( h1_pool: h1::PoolSettings, - h2_settings: h2::Settings, -) -> impl layer::Layer> + Copy { + h2: h2::ClientParams, +) -> impl layer::Layer> + Clone { layer::mk(move |connect: C| MakeClient { connect, h1_pool, - h2_settings, + h2_params: h2.clone(), _marker: PhantomData, }) } @@ -87,7 +87,7 @@ where fn call(&mut self, target: T) -> Self::Future { let connect = self.connect.clone(); let h1_pool = self.h1_pool; - let h2_settings = self.h2_settings; + let h2_params = self.h2_params.clone(); Box::pin(async move { let settings = target.param(); @@ -95,14 +95,12 @@ where let client = match settings { Settings::H2 => { - let h2 = h2::Connect::new(connect, h2_settings) - .oneshot(target) - .await?; + let h2 = h2::Connect::new(connect, h2_params).oneshot(target).await?; Client::H2(h2) } Settings::Http1 => Client::Http1(h1::Client::new(connect, target, h1_pool)), Settings::OrigProtoUpgrade => { - let h2 = h2::Connect::new(connect.clone(), h2_settings) + let h2 = h2::Connect::new(connect.clone(), h2_params) .oneshot(target.clone()) .await?; let http1 = h1::Client::new(connect, target, h1_pool); @@ -120,7 +118,7 @@ impl Clone for MakeClient { Self { connect: self.connect.clone(), h1_pool: self.h1_pool, - h2_settings: self.h2_settings, + h2_params: self.h2_params.clone(), _marker: self._marker, } } diff --git a/linkerd/proxy/http/src/h2.rs b/linkerd/proxy/http/src/h2.rs index 2efae686ca..abd4e02fe0 100644 --- a/linkerd/proxy/http/src/h2.rs +++ b/linkerd/proxy/http/src/h2.rs @@ -16,17 +16,55 @@ use std::{ use tracing::instrument::Instrument; use tracing::{debug, debug_span, trace_span}; +#[derive(Clone, Debug, Default)] +pub struct ServerParams { + pub flow_control: Option, + pub keepalive: Option, + pub max_concurrent_streams: Option, + + // Internals + pub max_frame_size: Option, + pub max_header_list_size: Option, + pub max_pending_accept_reset_streams: Option, + pub max_send_buf_size: Option, +} + +#[derive(Clone, Debug, Default)] +pub struct ClientParams { + pub flow_control: Option, + pub keepalive: Option, + + // Interansl + pub max_concurrent_reset_streams: Option, + pub max_frame_size: Option, + pub max_send_buf_size: Option, +} + +#[derive(Copy, Clone, Debug, Default)] +pub struct KeepAlive { + pub interval: Duration, + pub timeout: Duration, +} + #[derive(Copy, Clone, Debug, Default)] -pub struct Settings { - pub initial_stream_window_size: Option, - pub initial_connection_window_size: Option, - pub keepalive_timeout: Option, +pub struct ClientKeepAlive { + pub keepalive: KeepAlive, + pub while_idle: bool, +} + +#[derive(Copy, Clone, Debug)] +pub enum FlowControl { + Adaptive, + Fixed { + initial_stream_window_size: u32, + initial_connection_window_size: u32, + }, } #[derive(Debug)] pub struct Connect { connect: C, - h2_settings: Settings, + params: ClientParams, _marker: PhantomData B>, } @@ -38,10 +76,10 @@ pub struct Connection { // === impl Connect === impl Connect { - pub fn new(connect: C, h2_settings: Settings) -> Self { + pub fn new(connect: C, params: ClientParams) -> Self { Connect { connect, - h2_settings, + params, _marker: PhantomData, } } @@ -51,7 +89,7 @@ impl Clone for Connect { fn clone(&self) -> Self { Connect { connect: self.connect.clone(), - h2_settings: self.h2_settings, + params: self.params.clone(), _marker: PhantomData, } } @@ -79,11 +117,13 @@ where } fn call(&mut self, target: T) -> Self::Future { - let Settings { - initial_connection_window_size, - initial_stream_window_size, - keepalive_timeout, - } = self.h2_settings; + let ClientParams { + flow_control, + keepalive, + max_concurrent_reset_streams, + max_frame_size, + max_send_buf_size, + } = self.params; let connect = self .connect @@ -94,21 +134,40 @@ where async move { let (io, _meta) = connect.err_into::().await?; let mut builder = conn::Builder::new(); - builder - .executor(TracingExecutor) - .http2_only(true) - .http2_initial_stream_window_size(initial_stream_window_size) - .http2_initial_connection_window_size(initial_connection_window_size); + builder.executor(TracingExecutor).http2_only(true); + match flow_control { + None => {} + Some(FlowControl::Adaptive) => { + builder.http2_adaptive_window(true); + } + Some(FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }) => { + builder + .http2_initial_stream_window_size(initial_stream_window_size) + .http2_initial_connection_window_size(initial_connection_window_size); + } + } // Configure HTTP/2 PING frames - if let Some(timeout) = keepalive_timeout { - // XXX(eliza): is this a reasonable interval between - // PING frames? - let interval = timeout / 4; + if let Some(ClientKeepAlive { + keepalive: ka, + while_idle, + }) = keepalive + { builder - .http2_keep_alive_timeout(timeout) - .http2_keep_alive_interval(interval) - .http2_keep_alive_while_idle(true); + .http2_keep_alive_timeout(ka.timeout) + .http2_keep_alive_interval(ka.interval) + .http2_keep_alive_while_idle(while_idle); + } + + builder.http2_max_frame_size(max_frame_size); + if let Some(max) = max_concurrent_reset_streams { + builder.http2_max_concurrent_reset_streams(max); + } + if let Some(sz) = max_send_buf_size { + builder.http2_max_send_buf_size(sz); } let (tx, conn) = builder diff --git a/linkerd/proxy/http/src/server.rs b/linkerd/proxy/http/src/server.rs index 961910ffcf..89d9abccdc 100644 --- a/linkerd/proxy/http/src/server.rs +++ b/linkerd/proxy/http/src/server.rs @@ -1,6 +1,6 @@ use crate::{ - client_handle::SetClientHandle, h2::Settings as H2Settings, upgrade, BoxBody, BoxRequest, - ClientHandle, TracingExecutor, Version, + client_handle::SetClientHandle, h2, upgrade, BoxBody, BoxRequest, ClientHandle, + TracingExecutor, Version, }; use linkerd_error::Error; use linkerd_io::{self as io, PeerAddr}; @@ -20,7 +20,7 @@ mod tests; #[derive(Clone, Debug)] pub struct Params { pub version: Version, - pub h2: H2Settings, + pub http2: h2::ServerParams, pub drain: drain::Watch, } @@ -61,15 +61,50 @@ where type Service = ServeHttp; fn new_service(&self, target: T) -> Self::Service { - let Params { version, h2, drain } = self.params.extract_param(&target); + let Params { + version, + http2: h2, + drain, + } = self.params.extract_param(&target); + let h2::ServerParams { + keepalive, + flow_control, + max_concurrent_streams, + max_frame_size, + max_header_list_size, + max_send_buf_size, + max_pending_accept_reset_streams, + } = h2; let mut srv = hyper::server::conn::Http::new().with_executor(TracingExecutor); - srv.http2_initial_stream_window_size(h2.initial_stream_window_size) - .http2_initial_connection_window_size(h2.initial_connection_window_size); + match flow_control { + None => {} + Some(h2::FlowControl::Adaptive) => { + srv.http2_adaptive_window(true); + } + Some(h2::FlowControl::Fixed { + initial_stream_window_size, + initial_connection_window_size, + }) => { + srv.http2_initial_stream_window_size(initial_stream_window_size) + .http2_initial_connection_window_size(initial_connection_window_size); + } + } + // Configure HTTP/2 PING frames - if let Some(timeout) = h2.keepalive_timeout { - srv.http2_keep_alive_timeout(timeout) - .http2_keep_alive_interval(timeout / 4); + if let Some(ka) = keepalive { + srv.http2_keep_alive_timeout(ka.timeout) + .http2_keep_alive_interval(ka.interval); + } + + srv.http2_max_concurrent_streams(max_concurrent_streams) + .http2_max_frame_size(max_frame_size) + .http2_max_pending_accept_reset_streams(max_pending_accept_reset_streams); + if let Some(sz) = max_header_list_size { + srv.http2_max_header_list_size(sz); + } + if let Some(sz) = max_send_buf_size { + srv.http2_max_send_buf_size(sz); } debug!(?version, "Creating HTTP service"); diff --git a/linkerd/proxy/http/src/server/tests.rs b/linkerd/proxy/http/src/server/tests.rs index 894fda8e69..741144c025 100644 --- a/linkerd/proxy/http/src/server/tests.rs +++ b/linkerd/proxy/http/src/server/tests.rs @@ -23,7 +23,7 @@ async fn h2_connection_window_exhaustion() { tracing::info!("Connecting to server"); let mut server = TestServer::connect_h2( // A basic HTTP/2 server configuration with no overrides. - H2Settings::default(), + h2::ServerParams::default(), // An HTTP/2 client with constrained connection and stream windows to // force window exhaustion. hyper::client::conn::Builder::new() @@ -97,7 +97,7 @@ async fn h2_stream_window_exhaustion() { let mut server = TestServer::connect_h2( // A basic HTTP/2 server configuration with no overrides. - H2Settings::default(), + h2::ServerParams::default(), // An HTTP/2 client with stream windows to force window exhaustion. hyper::client::conn::Builder::new().http2_initial_stream_window_size(CLIENT_STREAM_WINDOW), ) @@ -201,13 +201,13 @@ impl TestServer { Self { client, server } } - async fn connect_h2(h2: H2Settings, client: &mut hyper::client::conn::Builder) -> Self { + async fn connect_h2(h2: h2::ServerParams, client: &mut hyper::client::conn::Builder) -> Self { Self::connect( // A basic HTTP/2 server configuration with no overrides. Params { drain: drain(), version: Version::H2, - h2, + http2: h2, }, // An HTTP/2 client with constrained connection and stream windows to accomodate client.http2_only(true),