Skip to content

Commit 2cc8c7d

Browse files
authored
fix(proxy/http): fix HTTP/1 client idle timeouts (#4004)
When constructing the HTTP/1 client, we configure connection pooling, but notably do not provide a timer implementation to Hyper. This causes hyper's connection pool to be configured without idle timeouts, which may lead to resource leaks, especially for clients that communicate with many virtual hosts. This change updates the HTTP/1 client builder to use a Tokio timer, which allows Hyper to manage idle timeouts correctly.
1 parent 21f3ffc commit 2cc8c7d

File tree

1 file changed

+1
-0
lines changed
  • linkerd/proxy/http/src

1 file changed

+1
-0
lines changed

linkerd/proxy/http/src/h1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ where
127127
hyper_util::client::legacy::Client::builder(TokioExecutor::new())
128128
.pool_max_idle_per_host(self.pool.max_idle)
129129
.pool_idle_timeout(self.pool.idle_timeout)
130+
.pool_timer(hyper_util::rt::TokioTimer::default())
130131
.set_host(use_absolute_form)
131132
.build(HyperConnect::new(
132133
self.connect.clone(),

0 commit comments

Comments
 (0)