I've been experimenting with the "Concurrent asynchronous HTTP exchanges"
sample here:
http://hc.apache.org/httpcomponents-asyncclient-dev/examples.html
I submit 20 requests to a test server that takes 1 second to respond. I see two
requests complete every second and it takes 10 seconds in total to complete all
20 requests. So it looks like there is a bottleneck.
I happen to have the current thread name included in log messages and I can see
requests completing in one of two threads ("I/O dispatcher 1" and "I/O
dispatcher 2"). Could it be that some thread count needs to increase? I
expected with NIO the number of threads could be kept lower than with blocking
I/O.
My question is what settings on DefaultHttpAsyncClient would you recommend to
configure for processing a larger number of concurrent requests?
I tried this but it didn't make a difference:
IOReactorConfig ioReactorConfig = new IOReactorConfig();
ioReactorConfig.setIoThreadCount(20);
HttpAsyncClient httpclient = new DefaultHttpAsyncClient(ioReactorConfig);
thanks,
Rossen
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]