Lucas Milotich
04/29/2021, 9:43 PMengine {
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!