xuemin.guan
09/30/2019, 10:31 AMorg.http4k.client.OkHttp()
use default OkHttp configuration and it seems it is optimized for single user application. 2. the team moved to creating OkHttp with their customized connection pooling configuration but it does not seem to pass their performance testing in some cases.
The team has therefor moved away from OkHttp and started using org.eclipse.jetty.client.HttpClient
.
We thought to use org.eclipse.jetty.client.HttpClient
instead as well given their experience. But thought to seek some recommendation here.dave
09/30/2019, 10:40 AMxuemin.guan
09/30/2019, 10:54 AMorg.http4k.client.OkHttp()
. But it still failed their perf test from time to time.
Eventually, they switched to org.eclipse.jetty.client.HttpClient
and have never had issue in their perf testing ever since. Their perf test have been running around 6 months now.xuemin.guan
09/30/2019, 10:57 AMs4nchez
09/30/2019, 10:58 AMapache
client is rock solid when it comes to performance. With the appropriate connection pool sizing/monitoring it works fine.
It's worth pointing out also that a lot of performance issues are also related to application design. In general, we recommend one client (with its own connection pool) per "target service", and potentially even individual clients for calls that are known to be of a different performance profile (e.g. file upload vs regular API calls).xuemin.guan
09/30/2019, 11:21 AMxuemin.guan
09/30/2019, 11:21 AMdave
09/30/2019, 2:54 PMxuemin.guan
09/30/2019, 3:31 PMxuemin.guan
09/30/2019, 3:34 PMval client = org.eclipse.jetty.client.HttpClient(SslContextFactory.Client())
client.start()
jettyHttpClient.connectTimeout = config.connectTimeout.toMillis()
jettyHttpClient.idleTimeout = config.readTimeout.toMillis()
val jettyHttp4kClient: HttpHandler = org.http4k.client.JettyClient(client = jettyHttpClient)
xuemin.guan
09/30/2019, 3:34 PMdave
09/30/2019, 3:35 PMRazi Kheir
10/04/2019, 7:20 AMRazi Kheir
10/04/2019, 8:55 AMHTTP protocol violation: Authentication challenge without WWW-Authenticate header
Razi Kheir
10/04/2019, 9:15 AMdave
10/04/2019, 9:48 AMRazi Kheir
10/08/2019, 4:33 AMdave
10/08/2019, 5:35 AM