Do you know of any free Java library which support the HTTP pipelining option of HTTP/1.1 ( http://en.wikipedia.org/wiki/HTTP_pipelining ) ?
5 Answers
I don't think you will find any common ones supporting pipe-lining. Jetty HttpClient seems to support it from document but I couldn't make it to do it.
Please note that Pipeline is different from keep-alive. Keep-alive just means reuse the connection but it may still send only one request at a time over the connection. With pipe-lining, you can send several requests at the same time over the same connection and wait for their respective responses.
HTTPClient apparently supports pipelining here:
http://www.innovation.ch/java/HTTPClient/
but I haven't tried it personally and can't verify this.

- 62,090
- 32
- 125
- 150
-
Commons HTTPClient has an open RFE for the same functionality - https://issues.apache.org/jira/browse/HTTPCLIENT-258 – Jonathan Holloway May 05 '10 at 23:11
-
That seems terribly old: the web page is dated 2001. Is it still alive? – Raedwald Oct 10 '12 at 11:50
hotpotato will support pipelining really soon. Performance-wise, it's way superior to Apache's HTTP Client, especially in high concurrency environments (multiple threads using the same instance of the client).
I still need to publish the results but on a LAN test, I'm getting ~7000req/s (hotpotato) vs ~100req/s (apache's). Of course, a great deal of the merit must go to Netty, the amazing framework hotpotato is built upon ;)
If you don't need a fancy full-fledged client, take a look here for a simpler version.

- 2,860
- 4
- 30
- 47
I realize my answer is about a year old, but as this is one of the top links for "java http pipelining", I thought it was relevant.
Hotpotato does indeed now support pipelining, and in my limited experience it's been working great so far. Also has a nice API to boot.
http://hotpotato.biasedbit.com/
EDIT: Looks like this project is now unmaintained and the author recommends the Async HTTP client: https://github.com/ning/async-http-client/

- 346
- 4
- 12
Apache HttpComponents Core 5 supports HTTP/1.1 pipelining. The example could be found here.

- 468
- 4
- 11