[lug] Web bandwidth accounting sw

Sean Reifschneider jafo at tummy.com
Wed Mar 14 03:59:51 MDT 2007


On Tue, Mar 13, 2007 at 04:28:01PM -0700, karl horlen wrote:
>If a webserver is going to be shared by a number of
>different sites with different owners, can anybody

If you set up the different sites to save their logs to different
locations, you can then just use the access_log to sum up the size column
and get rough estimates.  That of course doesn't count things like TCP
retransmissions or other cases where the line usage didn't exactly
translate to what the web server sent out (including, notably, TCP/IP
overhead).  However, plenty of systems are built from them.

Worst case, what you're looking to do is pretty easily implemented
yourself, including things like changing the config to a "Exceeded
bandwidth" page when they are over quota.

I can't really comment on available systems to do this, because all of the
accounting we do at our hosting facility is done at the routers, not on the
machines like you would with shared hosting setups.

>5) allocate percentages of the entire bandwidth pipe
>to individual sites so that if all the bandwidth is

If you are doing IP-based virtual hosting, that's easily enough done for
the outbound traffic using Linux shaping as mentioned in the other reply.
If you are doing Name-based virtual hosting, one (hard) option would be
to use layer-7 packet categorization to hand off to the shaping tools.
You'd want to look at things like mod_bandwidth, I think it might be able
to do something like this.

Thanks,
Sean
-- 
 Just go with the flow control, roll with the crunches, and, when you
 get a prompt, type like hell.
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability




More information about the LUG mailing list