>>>> with setMaxConnTotal(5) and >>>> setMaxConnPerRoute(5), assuming that each pool has a min of 2? >>>> Can I >>>> influence the minimum number of connections? >>>> >>> I am not sure I understand. >> How can I configure a pool for a given AsyncHttpClient for a size 2-5 >> (or 3-10 etc.)? > > Please use PoolingAsyncClientConnectionManagerBuilder to build an > instance of PoolingAsyncClientConnectionManager with the desired > settings or change the settings of an existing > PoolingAsyncClientConnectionManager through ConnPoolControl interface.
Ok, will try that. On first sight, however, I do not see how to set the lower pool size bound (2, 3)? https://github.com/apache/httpcomponents-client/blob/d2b3385ba2b655d9942263964aad78bcca391bda/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManagerBuilder.java Another question: I would like to test (enforce) HTTP/1.0 *no* keep-alive mode in my setup. My plan is to set: 1. myRequest.setProtocolVersion(HttpVersion.HTTP_1_0) 2. drop any Keep-Alive header from the actual responses (using a response interceptor?) Or is it more straightforward to define my own ConnectionKeepAliveStrategy? Many thanks, Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
