Closed thiagotnunes closed 9 years ago
My advice is to have one global client and use it wherever you have to call HTTP. Connections are kept alive in a pool by default, please see documentation for :max-conns-per-host and :max-conns-total of http.async.client/create-client.
Hope it helps, Hubert.
The advice offered by @neotyk above is accurate. In fact, there is a thread on the AsyncHttpClient mailing list supporting this position.
It was mentioned before that it is not very efficient to create a client per request, do you have any idea of a best approach for this? Maybe a connection pool?