[wplug] mod_throttle and bandwidth_module

Dave Neuer mr_fred_smoothie at yahoo.com
Mon Jan 20 19:39:09 EST 2003


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

--- John Harrold <jmh17 at pitt.edu> wrote:
> so i'm trying to limit the bandwidth coming out of
> my webserver so shell
> access out of and into my apartment will still be
> useful. i've read and
> poked around a bit and the apache modules listed
> above seem to be what i
> want. this is what ive done:
> 
> *using the bandwidth_module*
> 
> LoadModule bandwidth_module  
> modules/mod_bandwidth.so
> AddModule mod_bandwidth.c
> 
> <Directory "/home/httpd/html/">
>     BandWidth all 4096
>     AllowOverride All
>     Options ExecCGI Indexes FollowSymLinks
>     Allow from all
> </Directory>
> 
> and the webpages i'm accessing are located under
> /home/httpd/html
> 
> this just doesnt work.
> 
> 
> *using mod_throttle*
> 
> <IfDefine HAVE_THROTTLE>
> LoadModule throttle_module   
> modules/mod_throttle.so
> </IfDefine>
> 
> <IfDefine HAVE_THROTTLE>
> AddModule mod_throttle.c
> </IfDefine>
> 
> 
> <IfModule mod_throttle.c>
>     #ThrottlePolicy none
>     #ThrottlePolicy Speed 5K
>     #SetHandler throttle-me
> 
>     <Location /throttle-status>
>     SetHandler throttle-status
>     </Location>
> 
>     <Location /throttle-me>
>     SetHandler throttle-me
>     </Location>
>     <Location />
>     AddHandler cgi-script .pl
>     SetHandler throttle-me
>     ThrottlePolicy Speed 7K 1s
>     </Location>
> 
> </IfModule>
> 
> this might work, but my perl scripts that are
> generating the webpages are being
> spit out ast text and not running through mod_perl.
> now if i remove the 
> SetHandler throttle-me
> the perl scripts are executed correctly, but it
> doesnt appear to throttle the bandwidth useage down.
> 
> so does anyone have any thoughts?
> 
> 
> -- 
>
---------------------------------------------------------------
> 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/
> 

> ATTACHMENT part 2 application/pgp-signature 



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the wplug mailing list