apache/traffic limiting
my setup is apache/1.3 and debian linux .i wish to limit a customer's apache vhost like this : the first 9GB is 'burstable' and is served at line speed . following that , the vhost will be limited to 100KB/sec for the rest of the day .
what i've come up with is :
1) use mod_accounting to log bytes transferred
2) every 15 minutes , check amount transferred with a cron job .
3) if transfers exceed 9GB , replace customer's vhost config with one that has mod_bandwidth set to 100k/sec and restart apache
4) everyday at 6AM , reset byte counter , restore vhost config , and restart apache
is there a more elegant solution than the one above ?