After stress testing with and without the PoolingClientAsyncConnectionManager, we found that we had inconsistent results when we did not use the PoolingClientAsyncConnectionManager.
Among other things, we tracked the number of Http calls that we made and the number of completed Http calls (either through canceled (...), completed (...), or unsuccessful (...) functions of the associated FutureCallback) . Without the PoolingClientAsyncConnectionManager and under heavy load, these two numbers sometimes did not coincide, which led us to believe that somewhere some connections stomped on connection information from other threads (just a hunch).
In any case, with the PoolingClientAsyncConnectionManager, the numbers always match and the load tests were successful, so we definitely use it.
The last code we used is as follows:
public class RequestProcessor { private RequestProcessor instance = new RequestProcessor(); private PoolingClientAsyncConnectionManager pcm = null; private HttpAsyncClient httpAsyncClient = null; private RequestProcessor() {
source share