I'm trying to use mod_ratelimit, but it's exhibiting some odd behaviour.
Initially, my configuration was:
<Virtualhost>
...
<Directory /var/www/public>
Order Allow,Deny
Allow from All
Options FollowSymLinks
AllowOverride All
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 250
</Directory>
...
</Virtualhost>
I've also tried:
<Virtualhost>
...
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 250
...
</Virtualhost>
and
<Virtualhost>
<Location>
...
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 250
...
</Location>
</Virtualhost>
I was expecting the 8 MB file I was downloading to take about 30 seconds. It was done in an instant.
I've tried several values for rate-limit
and used wget to time them:
rate-limit | download speed
-----------+---------------
250 | 440 MB/s
100 | 440 MB/s
50 | 440 MB/s
30 | 20 kB/s
25 | 20 kB/s
10 | 6 kB/s
1 | 500 B/s
This is apache 2.4 running on Ubuntu 14.04