I have a server with a 30TB traffic allowance hosting (mostly) history images and would like to throttle one particular directory (the download image sizes) when necessary to avoid going over the limit. My thinking was that I could use either lighttpd with server.kbytes-per-second
or create eth0:0 and then use wondershaper for simplicity and measure the traffic using netstat -i but putting this altogether is a bit complicated. I am (reasonably) sure there's already a ready made solution for ISPs but I can't find it.
tc
to do traffic shaping, but that isn't meant to deal with quotas. What you are describing is a quota. I know this isn't the answer you are looking for, but really you should just add more nodes and load balance to increase your quota to avoid a bad user experience.