On Fri, 2014-07-11 at 10:11 +0800, 风 wrote: > I have a project that need to send 1000 httpRequest concurrently from to > client to server. > > First i use HttpClient's FutureRequestExecutionService to send the request. > But found that send 1000 httpRequest concurrently will consume so long time. > > So i want to use HttpAsyncClients to decrease the time. > > unfortunately i found that HttpAsyncClients need more time to send 1000 > httpRequest concurrently. > > Why the asynchronous way take more to time to complete? please help. > > Here is my test code. I send 100 request to www.baidu.com, and print the time > it take to response. The length of the response is 52999 bytes.
Any benchmark involving a remote site is meaningless. Generally, though, blocking clients tend to be faster than non-blocking (NIO based) ones. http://wiki.apache.org/HttpComponents/HttpClient3vsHttpClient4vsHttpCore Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
