httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent 'Dax' Royal-Gordon <br...@brentdax.com>
Subject [users@httpd] Bandwidth control under Apache 2
Date Mon, 10 May 2004 04:11:35 GMT
Hello,
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 
avatars.

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 
dramatically.

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 <brent@brentdax.com>
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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message