Forum Moderators: phranque
The latter would be more realistic, since the apache module I mentioned has been designed to limit data-transfer and might not do exactly what you need.
[snert.com...]
(oh duh, it was mentioned, sorry)
It's related to this thread as I am looking for a way to slow down access to specific file types on one of our servers for ALL visitors (such as windows media wmv, wma files)
Limiting use of server resources can be achieved at the request level, i.e. allowing only so many requests per IP, allowing only so many requests to certain resources, etc and at the bandwidth level, i.e. once access has been granted for a certain IP/resource you limit the bandwith available for serving this request.
mod_throttle will allow you to do all these things. It is an Apache module that you can control by ordinary Apache directives in your httpd.conf.
Apache::SpeedLimit and Apache::IPThrottle are both Perl modules that are run by mod_perl. SpeedLimit letīs you control the client request rate while IPThrottle lets you limit the bandwith used per IP address. Being Perl modules you can adjust these modules any way you want. But unless you are running mod_perl anyway or are prepared for a steep learning curve you probably should use mod_throttle.
Of course any serious decision on which technology to use would need to involve some prior benchmarking and analysis of your exact needs.
A different approach would be to do the bandwidth management at the OS level*. Let the web server serve web documents and the OS control bandwith. Traffic control via Hierarchical Token Buckets is very powerful and quite hard to configure. Itīs somewhat like mod_rewrite when it comes to rewriting URIs. ;)
Andreas