hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Why the delayTime of HttpAsyncClients is too long
Date Fri, 11 Jul 2014 16:15:41 GMT
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: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message