Exposing Maximum Connections Per Route in Ktor HttpClient Apache Engine
27.9K reputation · 24 Mar 2020, 08:11 UTC
The goal is to decide whether the default maximum connections per route limit (currently hard‑coded to 20) for the Apache engine should be exposed through the HttpClient configuration API.
Constraints include preserving backward compatibility, avoiding unintended side effects for users of other engines, and aligning the new setting with Ktor’s existing configuration patterns. There is uncertainty about whether exposing this value will provide needed flexibility without encouraging misuse, and what default should be retained to keep current behavior.
Should the maximum connections per route be configurable through HttpClient engine settings? If exposed, what default value should be preserved to maintain current behavior? How would this setting interact with existing pool configuration options across different engines?