[wplug] mod_throttle and bandwidth_module

John Harrold jmh17 at pitt.edu
Mon Jan 20 22:59:22 EST 2003


Sometime in January Dave Neuer assaulted the keyboard and produced:

| Not having used mod_throttle or mod_bandwidth, my only
| thought is if you have a 2.4 linux firewall you can
| use the tc (traffic control) kernel module to limit
| bandwidth, and this will work not just for HTTP
| traffic, but for traffic on other ports as well.
| 
| It can even be set up so that HTTP takes up all the
| bandwidth it can, unless you're logged in via SSH in
| which case the SSH connection will steal bandwidth
| from the HTTP traffic (up to whatever limits you set).
| 
| Of course, it's been a while since I used it and you'd
| want to read the docs for tc to figure out how to
| configure it.
| 
| Dave

yeah i started looking into this type of solution after my failed attempts
with apache. my roommate found something called cbq which comes with
redhat-its basically a bash script that takes a config file and runs ip and
tc for me. it works really well once we figured out the config file name.
just dump the following into:

<file: /etc/sysconfig/cbq/cbq-0001.apache>
DEVICE=eth0,10Mbit,1Mbit
TIME=07:00-18:00;48Kbit/1Kbit
RATE=10Mbit
WEIGHT=1Mbit
PRIO=5
RULE=192.168.1.5:80,
</file>

then put the following in roots cron:
*/3 * * * * /sbin/cbq timecheck

and it should bring take the webserver bandwidth down to 4KBps between 7am
and 6pm.

a little more documentation would be nice, but pretty nifty none the less.


-- 
---------------------------------------------------------------
john harrold               | "They that can give up essential  
     jmh17+maps at pitt.edu   |  liberty to obtain a little       
/"\                        |  temporary safety deserve neither 
\ / ASCII ribbon campaign  |  liberty nor safety."             
 X  against HTML mail      |                                  
/ \                        |  Benjamin Franklin
---------------------------------------------------------------
gpg --keyserver keys.indymedia.org --recv-key F65A739E
---------------------------------------------------------------
Beware of all enterprises that require new clothes.
--Henry David Thoreau

wickets of mass distruction (wmd)
http://www.cricketworldcup.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://penguin.wplug.org/pipermail/wplug/attachments/20030120/aa1c394b/attachment-0001.bin


More information about the wplug mailing list