There are certain modules for Apache 1.x and 2.x that will allow you to set the maximum for the transfer amount, most of them are tracked using the scoreboard file created by Apache (when mod_status is enabled with ExtendedStatus), the one that I still noted with of the moment when I was looking for it, mod_curb , however, it is not complete and currently only works on server scales, and not on separate virtual hosts.
Apache modules can be configured as outgoing filters, so you can write a suit module that sits at the end of the chain and add all outgoing packets using the data provided by APR, then you can add them to the counter for that particular domain / subdomain. After that, you have a choice of what to do with the data.
mod_deflate, Apache, , , , , . .
, , . . , perl script, 15 . , 15 , , , perl , . tail -F, perl , , . , , , .