Hello everyone, I’m using a apache ktor client inj...
# ktor
l
Hello everyone, I’m using a apache ktor client injected by koin. When I run stress tests, the client starts queueing http calls and making them very slow. this is my cfg:
Copy code
engine {
    threadsCount = 50
    pipelining = true
    socketTimeout = httpClientConfig.socketTimeout
    connectTimeout = httpClientConfig.connectionTimeout
    connectionRequestTimeout = httpClientConfig.connectionRequestTimeout
    customizeClient {
        setDefaultHeaders(
            listOf(
                BasicHeader(headerContentTypeKey, ContentType.Application.Json.toString()),
                BasicHeader(headerAuthorizationKey, Configuration.get("auth_token")),
                BasicHeader(headerOriginKey, appName),
                BasicHeader(headerUserAgentKey, "$appName $appVersion")
            )
        )
        this.setDefaultIOReactorConfig(
            IOReactorConfig.custom()
                .setSoKeepAlive(true)
                .setIoThreadCount(140)
                .setSelectInterval(10)
                .setInterestOpQueued(true)
                .build()
        )
        this.setMaxConnTotal(10000)
        this.setMaxConnPerRoute(10000)
        this.setConnectionReuseStrategy(DefaultConnectionReuseStrategy())
        this.setDefaultConnectionConfig(ConnectionConfig.DEFAULT)
        this.setKeepAliveStrategy(DefaultConnectionKeepAliveStrategy())
    }
}
any ideas what is going on? I tried apache client alone and i have the results. Also with CIO client. With asynchttp i can run stress test without any problem of response time. Thanks!