You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Aurélien Pernoud <ap...@sopragroup.com> on 2002/09/27 11:59:28 UTC

RE: [HttpClient] Bad performance with multiple request to same host ?

Personnaly I've been overwriting the HttpMultiClient (copying it and using
mine) and using my own HttpConnectionManager on which I simply increased the
total number of allowed connections on a site this way :

private HttpConnectionManager mgr = new HttpConnectionManager();
mgr.setMaxConnectionsPerHost(100);

This way I allow 100 connections to the host, and performances are better.

But I think that in HttpMultiClient their should be getter on the
connectionmanager that is private :-(

Well now that we are two users interested, maybe they will modify it ?
Someone can please tell us from commons-dev ?

Thanx,
Aurélien Pernoud

> -----Message d'origine-----
> De : Juho-Pekka Virolainen [mailto:jpv@mobicus.com]
> Envoyé : mercredi 25 septembre 2002 21:24
> À : apernoud@sopragroup.com
> Objet : [HttpClient] Bad performance with multiple request to
> same host
> ?
>
>
> Hi,
>
> While searching for a solution for a httpclient performance problem I
> stumbled
> into your article about your experience of jakarta-commons
> httpclient. We
> also
> have noticed that performance is terribly bad; apparently
> because the method
> reading HTTP reply header lines reads them char by char using
> non-buffered
> io.
>
> I'm really not looking forward to start patching httpclient
> if there is any
> other
> viable solution available. Did you you find any resolution to
> this problem?
>
> best regards,
> 	Juho-Pekka Virolainen
> 	CTO
> 	Mobicus Ltd.
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [HttpClient] Bad performance with multiple request to same host ?

Posted by Ortwin Glück <or...@nose.ch>.
 From RFC2616:

<cite>
Clients that use persistent connections SHOULD limit the number of 
simultaneous connections that they maintain to a given server. A 
single-user client SHOULD NOT maintain more than 2 connections with any 
server or proxy.

These guidelines are intended to improve HTTP response times and avoid 
congestion.
</cite>

We can, however, introduce a configuration key for this in the (future) 
config architecture of http client. Default will be 2 per client.

Odi

Aurélien Pernoud wrote:
> Personnaly I've been overwriting the HttpMultiClient (copying it and using
> mine) and using my own HttpConnectionManager on which I simply increased the
> total number of allowed connections on a site this way :
> 
> private HttpConnectionManager mgr = new HttpConnectionManager();
> mgr.setMaxConnectionsPerHost(100);
> 
> This way I allow 100 connections to the host, and performances are better.
> 
> But I think that in HttpMultiClient their should be getter on the
> connectionmanager that is private :-(
> 
> Well now that we are two users interested, maybe they will modify it ?
> Someone can please tell us from commons-dev ?
> 
> Thanx,
> Aurélien Pernoud
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>