Thoughts and tutorials on programming

Friday, January 19, 2007

throttling with apache

So it appears that there is no "good" throttler for apache 2.x -- mod_cband only allows a max of 123 KB/s or something like that--at least on the LAN, so I think this probably means that it is just too slow for large loads, and I cannot see another good throttler for apache 2.x

So we go ahead and use apache 1.3.x
Unfortunately this means that when you install apacche 1.3.x you need to install ./configure --enable-module=so (installs mod_so) so that you can THEN compile/use mod_throttle (found at http://www.ivor.it/throttle/)

3 comments:

Roger Pack said...

so mod_cband does WEIRD things with numbers--like defaulting to exactly 250K/s or 500. Very odd. And mod_bw seems to work if you do numbers like 1024000, however it 'maxes out' at 2MB/s, for whatever reason, so it's like it will just add 2MB/s clients until it reaches its designated cap, then it will start to throttle them down. Others that did not seem to work: mod_throttle seems to either have some serious issues (there was one of these that would 'allow' downloads at full speed, then disallow future requests until it felt like the limit had been reached--ugh) and mod_bandwidth also seemed unsatisfactory. So--use mod_bw, apache 2.x, and don't set it above 2048000 for BandWidth all

Roger Pack said...

LoadModule bw_module modules/mod_bw.so
#Throttle
BandWidthModule On
ForceBandWidthModule On
#BandWidth all 20480000
BandWidth all 100000

note planetlab may have apxs pre-installed [or with httpd itself] look for it.

/usr/sbin/apachectl

Roger Pack said...

note may need to delete line from "APR_VERSION < 1" to "#endif" fro mod_bw.c to get it to compile

Contributors

Followers