On Fri, 07 Aug 2015 09:43:02 GMT, Yazan D wrote:

On Sun, 28 Jun 2015 12:48:58 GMT, Etienne Cimon wrote:

I couldn't reproduce this. I tried alongside a WebRequest in C# and the result is the same, it's pretty much 2 to 4x the latency of the server multiplied by the number of requests. For a 40ms latency, you get 120ms per request for a download within 3 roundtrips, and then multiply by 1000 requests and you get a 120 seconds job. Obviously, if you use concurrent tasks it finishes within less than 1 second.

I can reproduce this easily by setting up a local HTTP server using http-server serving a 13-bytes text file, and using the code above versus ab -k -c 1 -n 500 'http://127.0.0.1:8080/file.txt'.
ab finishes in 10 seconds while requestHTTP takes around 20 seconds.
I also noticed that when setting settings.defaultKeepAliveTimeout to 0.msecs, and running ab without keep-alive, the times fall closer to each other (and both are much faster finishing in less than 1 second! (most probably due to the server)).

Sorry if I'm being picky, you were doing 1000 requests with requestHTTP above, your ab -n 500 will make 500 requests. Did I understand correctly the parameters