I'm implementing rest client with apache http client. So I'm configuring it with RequestConfig:
<bean id="rest-client.requestConfigBuilder" class="org.apache.http.client.config.RequestConfig"
factory-method="custom">
<property name="socketTimeout" value="${rest.readTimeout}"/>
<property name="connectTimeout" value="${rest.connectTimeout}"/>
<property name="connectionRequestTimeout" value="${rest.connectTimeout}"/>
</bean>
And with
<bean id="rest-client.connectionManager" class="org.apache.http.impl.conn.PoolingHttpClientConnectionManager">
<property name="maxTotal" value="${rest.maxTotalConnections}"/>
<property name="defaultMaxPerRoute" value="${rest.maxTotalConnections}"/>
</bean>
My question is - how do I pickup best parameters for timeouts, maxTotal connections, etc? Is there any guide? Because what I'm doing now - just randomly picking up those parameters. I think those values should be set reasonably. Can you please explain me how to chose them or point to good articles. And maybe are there some tools to profile this?