httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent 'Dax' Royal-Gordon <>
Subject [users@httpd] Bandwidth control under Apache 2
Date Mon, 10 May 2004 04:11:35 GMT
I am a small-scale sysadmin running an x86-based Debian Linux server 
with Apache 2.0.48 over an ADSL line.  Among the sites on this server is 
a public file-hosting service, intended for small files such as forum 

Recently, a user uploaded several dozen large zip files and posted links 
on a website.  As a result, I got eighty thousand extra requests in one 
day, all for multi-megabyte files--on a site that usually gets less than 
40k hits, requesting files that average 20kb or so.  As you can imagine, 
my DSL line positively freaked out at this.

I've since deleted those files (as I write this, I'm watching the 
HTTP/410 entries in the access log scroll by in another window), but I'd 
like to take steps to ensure that a file or small collection of files 
can't monopolize my server's bandwidth in the future.  (I want to 
regulate the flow of traffic out of my server, not place 
daily/weekly/monthly transfer caps on my users.)

Online searches have turned up modules like mod_bandwidth and 
mod_throttle, but these all seem to be for Apache 1.3.  I don't believe 
that downgrading is an option--I have several sites written in Embperl 
2.0, which depends on mod_perl 2, which of course depends on Apache 2. 
I've tried compiling mod_bandwidth, but the compilation failed rather 

Searching the list archives gave me a thread from January stating that 
there were no Apache 2 modules to perform this service.  Is this still 
true?  If so, how difficult would it be to port one of the Apache 1.3 
modules?  (Although I've done work in both the Perl 5 and Parrot cores, 
I'm hardly a C god.)

Alternately, how difficult would it be to implement such a module from 
scratch, and would it be easier (or even possible) to implement in mod_perl?

(I am aware of Linux's built-in traffic shaping; however, I haven't been 
able to get it to work.  Feel free to contact me off-list if you want to 
help me get that working.)

Thanks in advance,
Brent "Dax" Royal-Gordon <>
Perl and Parrot hacker

Oceania has always been at war with Eastasia.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message