core / pragma.http / Apache5HttpClientFactory /
Apache5HttpClientFactory #
object Apache5HttpClientFactory
Builds outbound ktor clients on the Apache5 engine, which pools connections. CIO only reuses connections when pipelining is enabled, so every request would otherwise pay a new TCP connect and TLS handshake.
Apache5 has no WebSocket support; WebSocket clients stay on CIO.
Properties #
| Name | Summary |
|---|---|
Must stay at or above the largest concurrency limit configured on a caller of this client. httpclient5 does not bound the wait for a pooled connection, so a caller blocked on an exhausted pool fails at REQUEST_TIMEOUT_MILLIS and is recorded as a request timeout, not as pool exhaustion. | |
ktor hard-codes 4 IO reactor threads for Apache5; the factory raises it to the core count. |