You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Travis Bear <tr...@yahoo.com> on 2006/02/19 11:50:44 UTC
Bandwidth Throttling?
Sorry if this is a newb question. Web searches have returned no satisfactory answers.
I'm running a test app with hundreds of threads that each generate HTTP requests. Is there some mechanism that exists to cap the bandwidwitdh used by each thread in order to simulate slower connections?
If this doesn't exist already, I will have to write something to do it. In tis case would there be interest in including this feature in HttpClient?
Thanks!
-Travis
---------------------------------
What are the most popular cars? Find out at Yahoo! Autos
Re: Bandwidth Throttling?
Posted by Tony Seebregts <to...@cibecs.com>.
Hi Travis,
One way of doing it is to use an InputStreamRequestEntity to submit and
supply a subclass of InputStream that implements throttling.
regards
Tony Seebregts
> Sorry if this is a newb question. Web searches have returned no satisfactory answers.
>
> I'm running a test app with hundreds of threads that each generate HTTP requests. Is there some mechanism that exists to cap the bandwidwitdh used by each thread in order to simulate slower connections?
>
> If this doesn't exist already, I will have to write something to do it. In tis case would there be interest in including this feature in HttpClient?
>
> Thanks!
>
>
> -Travis
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: Bandwidth Throttling?
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2006-02-21 at 10:50 +0000, sebb wrote:
> On 20/02/06, Oleg Kalnichevski <ol...@apache.org> wrote:
> > On Sun, 2006-02-19 at 02:50 -0800, Travis Bear wrote:
> > > Sorry if this is a newb question. Web searches have returned no satisfactory answers.
> > >
> > > I'm running a test app with hundreds of threads that each generate HTTP requests. Is there some mechanism that exists to cap the bandwidwitdh used by each thread in order to simulate slower connections?
> > >
> > > If this doesn't exist already, I will have to write something to do it. In tis case would there be interest in including this feature in HttpClient?
> > >
> > > Thanks!
> > >
> > >
> > > -Travis
> > >
> >
> > Travis,
> >
> > HttpClient does not support bandwidth throttling out of the box, however
> > it should not be that difficult to implement a custom socket factory
> > that is bandwidth throttling capable.
> >
> > I believe Sebastian of the JMeter fame has implemented something of that
> > sort for Jakarta JMeter. JMeter dev list should be the right place to
> > ask around
> >
>
> FYI: I added a "Slow Socket" implementation for use with HttpClient.
>
> See
>
> org/apache/jmeter/util/SlowSocket.java
> under src/core
> and
>
> org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.java
> under
> src/protocol/http
http://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/util/SlowSocket.java
http://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.java
>
> The code is invoked by
>
> Protocol.registerProtocol(PROTOCOL_HTTP,
> new Protocol(PROTOCOL_HTTP,
> new SlowHttpClientSocketFactory(cps),
> DEFAULT_HTTP_PORT));
>
> Would there be any interest in adding this to HttpClient, perhaps as a
> contrib item?
>
There certainly would be some interest in such a contribution
Oleg
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: Bandwidth Throttling?
Posted by sebb <se...@gmail.com>.
On 20/02/06, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Sun, 2006-02-19 at 02:50 -0800, Travis Bear wrote:
> > Sorry if this is a newb question. Web searches have returned no satisfactory answers.
> >
> > I'm running a test app with hundreds of threads that each generate HTTP requests. Is there some mechanism that exists to cap the bandwidwitdh used by each thread in order to simulate slower connections?
> >
> > If this doesn't exist already, I will have to write something to do it. In tis case would there be interest in including this feature in HttpClient?
> >
> > Thanks!
> >
> >
> > -Travis
> >
>
> Travis,
>
> HttpClient does not support bandwidth throttling out of the box, however
> it should not be that difficult to implement a custom socket factory
> that is bandwidth throttling capable.
>
> I believe Sebastian of the JMeter fame has implemented something of that
> sort for Jakarta JMeter. JMeter dev list should be the right place to
> ask around
>
FYI: I added a "Slow Socket" implementation for use with HttpClient.
See
org/apache/jmeter/util/SlowSocket.java
under src/core
and
org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.java
under
src/protocol/http
The code is invoked by
Protocol.registerProtocol(PROTOCOL_HTTP,
new Protocol(PROTOCOL_HTTP,
new SlowHttpClientSocketFactory(cps),
DEFAULT_HTTP_PORT));
Would there be any interest in adding this to HttpClient, perhaps as a
contrib item?
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: Bandwidth Throttling?
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2006-02-19 at 02:50 -0800, Travis Bear wrote:
> Sorry if this is a newb question. Web searches have returned no satisfactory answers.
>
> I'm running a test app with hundreds of threads that each generate HTTP requests. Is there some mechanism that exists to cap the bandwidwitdh used by each thread in order to simulate slower connections?
>
> If this doesn't exist already, I will have to write something to do it. In tis case would there be interest in including this feature in HttpClient?
>
> Thanks!
>
>
> -Travis
>
Travis,
HttpClient does not support bandwidth throttling out of the box, however
it should not be that difficult to implement a custom socket factory
that is bandwidth throttling capable.
I believe Sebastian of the JMeter fame has implemented something of that
sort for Jakarta JMeter. JMeter dev list should be the right place to
ask around
Oleg
>
> ---------------------------------
>
> What are the most popular cars? Find out at Yahoo! Autos
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org