Skip to content

Commit 9c48e24

Browse files
authored
fix(app/env): limit default inbound connection pool size (#4007)
The inbound connection pool is effectively unlimited. This change configures a default limit of 10K.
1 parent df38a5a commit 9c48e24

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

linkerd/app/src/env.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,11 @@ const DEFAULT_INBOUND_HTTP1_CONNECTION_POOL_IDLE_TIMEOUT: Duration = Duration::f
343343
// TODO(ver) This should be configurable at the load balancer level.
344344
const DEFAULT_OUTBOUND_HTTP1_CONNECTION_POOL_IDLE_TIMEOUT: Duration = Duration::from_secs(3);
345345

346-
// By default, we don't limit the number of connections a connection pool may
347-
// use, as doing so can severely impact CPU utilization for applications with
348-
// many concurrent requests. It's generally preferable to use the MAX_IDLE_AGE
349-
// limitations to quickly drop idle connections.
350-
const DEFAULT_INBOUND_MAX_IDLE_CONNS_PER_ENDPOINT: usize = usize::MAX;
351-
// By default, we limit the number of outbound connections that may be opened
352-
// per-host. We pick a high number (10k) that shouldn't interfere with most
353-
// workloads, but will prevent issues with our outbound HTTP client from
354-
// exhausting the file descriptors available to the process.
346+
// By default, we limit the number of connections that may be opened per-host.
347+
// We pick a high number (10k) that shouldn't interfere with most workloads, but
348+
// will prevent issues with our outbound HTTP client from exhausting the file
349+
// descriptors available to the process.
350+
const DEFAULT_INBOUND_MAX_IDLE_CONNS_PER_ENDPOINT: usize = 10_000;
355351
const DEFAULT_OUTBOUND_MAX_IDLE_CONNS_PER_ENDPOINT: usize = 10_000;
356352

357353
// These settings limit the number of requests that have not received responses,

0 commit comments

Comments
 (0)