We are using OkHttp in WAS environment Could you please help us with the below queries -:
Question 1: What should be the ideal connection pool size and keep Alive for a container environment , is there any formula to calculate it, we will be using Okhttp client to connect to two different URL's
Question 2: We don't want to have any client side failures , how does OkHttp handle stale connections , I don't see any parameter in OkHttp to check for stale connections?
HTTP Java client Java has this parameter to turn on stale connection check:
http.connection.stalecheck
We are using OkHttp client as mentioned below , is there any important configuration am I missing?
new OkHttpClient.Builder()
.readTimeout(10,TimeUnit.SECONDS)
.retryOnConnectionFailure(false)
.connectTimeOut(5,TimeUnit.SECONDS)
.connectionPool(new ConnectionPool(10,5,TimeUnit.SECONDS)
.build();