This is a website development tool. It's not intended to be used on a production webserver.
Written in 2001, this tool came from a time when a website might be on a single server, and many desktop PCs were on slow modems.
These days (2011) it seems that websites are deliberately written for mobiles, yet assume fast connections. You don't need this tool to test that - just switch to your phone to 2G mode to simulate a weak 3G signal.
When writing webpages, it's important to think about how it will look downloading over a modem. For that, a low-performance webserver would be ideal, something that only served 33 kilobytes a second.
Throttle is a Java application that sits between a browser and a webserver, and chokes the connection. You need a Java runtime environment (not necessarily the full development kit) to use it - it's not an in-browser applet.
If you're looking for production tools, various bandwidth chokers exist for Apache - try typing "throttle" into the search engine at <modules.apache.org/search>.
Unzip the binaries ZIP file (which unzips to a subdirectory called
"classes"). From the command prompt change to this directory and
run
java Throttle
It will then ask you 5 questions about the configuration.
Just press enter to accept the defaults - it listens on TCP port 8080,
and expects to be choking the connection to a webserver on the same
machine. It pauses for a second at the start of each connection, and
then another second every 512 bytes.
Using the default configuration and a web browser on the same machine as the throttle, the choked site will be at http://localhost:8080/ .
Under Windows and UNIX / Linux, it can be quit by control-C. The statistics printed as it runs are in order:
A pair of equals signs denotes a new connection opening.
It just forwards data, suitably throttled, without rewriting the requests. In a test environment you probably won't see any problems.
Putting http://localhost:8080/ in the browser address bar won't work correctly if the webserver supports virtual hosts.
If you configure your browser's proxy to be http://localhost:8080/ and then access the normal URL of your development site, it should work with virtual hosts. But this might stop it working with pre HTTP/1.1 servers (is anyone still using these in development?). Also, it redirects all queries to the same server, so you won't be able to look at anywhere else with your browser. Another problem (or feature) is that links that include the server name will be throttled; but links that go to a different server will be broken.
You may use this (with NO WARRANTEE) for your personal use. You may also relicense it under version 2 of the GNU General Public License, provided that you add the appropriate GPL boilerplate to the source.
The reason for this odd licensing is in the history section. I want to put it under the GPL, but the act of adding the license text would make it unclear whether it was owned by myself or my employer.
I'm not providing a binary version of this, because you need to edit the source to configure it. This has been fixed for version 2, which I recommend you use instead.
The code for version 1 is much more straightforward than version 2.
I originally posted version 1 in response to a request in the newsgroup
comp.infosystems.www.authoring.misc
, at the time I didn't think it
was a good solution. Having rewritten it, I believe it's a fairly useful
tool.
It was originally written to watch the data passing across a connection,
which I then modified to be a bandwidth throttle. See the X Window utility
xmond(1)
for a better description of the original purpose. These
days I would recommend using Ethereal for this kind of data logging.
For a long time, I was unsure whether to provide it under the GPL or BSD license. Before I chose, I used the binary in my day job, which has a clause in my employment contract to stop people writing programs outside work, and debugging them on company time.
To be certain about ownership, I have not modified the source since. The source currently lacks GPL copyright notices, preventing it being distributed under the GPL in its current form. Thus the strange arrangement that anyone other than the author may put it under the GPL.
I don't believe that this modification would cause the copyright to transfer, but I want to be absolutely certain about the ownership.