On Wed, 2016-01-06 at 08:37 -0500, Benson Margulies wrote: > Here's my situation: > > I have an application that parcels out work via HTTP to services that > run behind AWS EC2 ELBs. So, a single IP address is the 'front' for a > potentially vast amount of capacity -- many instances, each with many > worker threads that can handle HTTP requests in parallel. > > I coded this to use the HTTP Async client to do the HTTP transactions. > > My first cut didn't work very well, because the default limits on max > connections per route and total max connections in the async client > throttled the process. > > I've pushed those limits way up, but I have a leftover qualm; am I > using the library as intended? >
There is no one and only true way to manage connections. If your application needs to be able to handle massive bursts of requests you might want to increase max and per route connection limits. At the same time there is nothing stopping your application from evicting idle connections from the connection pool once things go back to normal. The classic (blocking) HttpClient provides a way to adjust connection limits automatically using a backoff strategy. Something similar can be done for HttpAsyncClient with some efforts. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org