Question
Can Ballerina's HTTP client enforce an idle connection timeout independent of the JDK?
Lax Atlas
0 reputation · 24 Sept 2025, 21:30 UTC
26.9K views0
Goal
Diagnose intermittent exhaustion of Ballerina’s HTTP client connection pool when bursts of requests exceed the configured maxOpenConnections.
Constraints
The pool is backed by the JDK HttpClient, which varies between JDK 11 and JDK 17. No built‑in idle‑connection cleanup is exposed, and Prometheus metrics must be enabled to observe pool state.
Unresolved Design Decision
It is unclear whether the runtime should automatically close idle sockets after a configurable timeout, or rely on the underlying JDK’s behavior.
Questions
- Can the Ballerina HTTP client be configured to enforce an idle connection timeout independent of the JDK?
- Does the runtime close idle connections after a configurable period, or is this entirely delegated to the JDK?
- Will upgrading to JDK 17 change the idle‑connection cleanup semantics compared to JDK 11?