Correct way to implement HTTP Connection Pooling

I am using Apache HTTP Client for connection pooling during my REST API calls into certain web services.

Strange thing is that in spite of me using HTTP Connection Pooling there are no gain in my performance.

I am using Apache HTTP Client to connect to my web services, and the code is as follows from there documentation :

PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();



HttpHost localhost = new HttpHost("", 80);

cm.setMaxPerRoute(new HttpRoute(""), 50);

CloseableHttpClient httpClient = HttpClients.custom()



I am using Spring's RestTemplate to wrap around the HttpClient implemenation of Apache using Spring's HttpComponentsClientHttpRequestFactory.

But even if I use...

Read More »

By: StackOverFlow - Saturday, 16 June

Related Posts