From a408cd5de6313e82b3e90f970cd10c86bc26bed4 Mon Sep 17 00:00:00 2001 From: Madhavendra Rathore Date: Sun, 17 May 2026 12:37:21 +0000 Subject: [PATCH] feat(config): bump HttpConfig pool_max_idle_per_host default 10 -> 100 Matches the JDBC driver's `HttpConnectionPoolSize` default (100) and the kernel-internal `HttpClientConfig` default. Closes ~9x of the throughput gap with the NodeJS thrift driver's `maxSockets: Infinity` default for high-concurrency workloads (bursty parallel executeStatement, parallel CloudFetch chunk downloads). reqwest/hyper does not bound this; the prior 10 was a kernel-side conservative choice. Spec: sea-workflow/specs/07-errors-retries/connection-pool-default-mismatch.md Signed-off-by: Madhavendra Rathore --- src/config.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 288e8d61..c6cb496a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -321,7 +321,13 @@ pub struct HttpConfig { /// Maximum total time across retries for a single logical RPC. pub overall_timeout: Duration, - /// Connection pool size. + /// Connection pool size (max idle warm sockets per remote host). + /// + /// Defaults to `100`, matching the JDBC driver's `HttpConnectionPoolSize` + /// default. Raise this for workloads that burst many concurrent + /// `executeStatement` calls or CloudFetch chunk downloads against a + /// single host; too low a value forces fresh TLS handshakes when the + /// pool fills. pub pool_max_idle_per_host: usize, } @@ -330,7 +336,7 @@ impl Default for HttpConfig { Self { request_timeout: Duration::from_secs(120), overall_timeout: Duration::from_secs(900), - pool_max_idle_per_host: 10, + pool_max_idle_per_host: 100, } } } @@ -640,4 +646,15 @@ mod tests { assert!(s.contains("")); assert!(s.contains("databricks")); } + + // ─── HttpConfig defaults ─────────────────────────────────────── + + #[test] + fn http_config_default_pool_max_idle_per_host_is_100() { + // Matches the JDBC driver's `HttpConnectionPoolSize` default and + // narrows the throughput gap with thrift's `maxSockets: Infinity` + // for high-concurrency workloads. See + // `sea-workflow/specs/07-errors-retries/connection-pool-default-mismatch.md`. + assert_eq!(HttpConfig::default().pool_max_idle_per_host, 100); + } }