Hi everybody,

I want to collect (execution) timing probes from various processing
stages of a request/response inside an AsyncHttpClient (running HC 5
alpha 2 & friends).

So far, I rougly implemented sth. sketched out my Oleg in this posting I
found when crawling the archive:

> In this case you should have a pool of HttpClient instances each
> configured to use a small pool of connections (2 to 5). This setup will
> be more representative of thousands of concurrent browser connections.
> With one large pool of connections you basically have 1000 thousand of
> threads constantly contending for one global pool lock. 

http://httpcomponents.10934.n7.nabble.com/Scalable-Http-Client-td20712.html

I have some follow-up questions:

1) How to best emit timing probes (start, end time) for a
request/response pair: Setup a pair of correlated request/response
interceptors? Instrument the FutureCallback callback methods? Right now,
I collect at every of those, but the start times (FutureCallback
construction, request interceptor) do not match my intention, as they
are processed before the request is eventually executed. There is
clearly sth. more appropriate that I am missing ...

2) How can I best collect timing probes from establishing the underlying
connections? (connection established times).

3) "a small pool of connections (2 to 5)" Am I reading this correctly,
that each AsyncHttpClient instance should be equipped with its own
connection manager (setConnectionManager), with setMaxConnTotal(5) and
setMaxConnPerRoute(5), assuming that each pool has a min of 2? Can I
influence the minimum number of connections?

4) If I want to force my AsyncHttpClients/async HttpRequests setup into
a blocking, sequential variant (as implemented using a loop over a
BasicHttpClient), can I use a semaphore as hinted at here:

> final Semaphore semaphore = new Semaphore(1);

https://stackoverflow.com/questions/30101865/how-to-configure-the-number-of-allowed-pending-requests-in-apache-async-client

Any hints would be greatly appreciated!

Thx,
Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to