[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: VirtualHost bandwidth management



Steven Jacobs wrote:
> Hi All,
> 
> I'm looking for a way to measure data volume and bandwidth usage for
> Apache virtualhosts. It would also be nice if we could throttle the
> available bandwidth based on data volume usage.
> 
> I would prefer the data to be available in a database so our developers
> can provide customers with a webpage showing how much data volume has
> been used.
> 
> I tried many Apache modules for this purpose. Mod_cband used to work
> fine, but it did not appear to work with MySQL databases. Since the
> latest release of Debian, the Apache2 module mod_cband is no longer
> available and the Etch version can be installed but does not seem to
> work. Other modules do not provide the functionality I'm looking for.
> Mod_bw makes it possible to limit bandwidth, but that's about it.
> 
> Another thing I tried is to parse awstats data and put it in a database.
> This would work, but how should I throttle the bandwidth dynamically?
> 
> Also, we are planning to move all our vhosts to an LVS web cluster. A
> few questions that arise are: what about statistics if many servers
> serve the same pages? Which server should do the bandwidth measurement?

Hi,

Just use libapache2-mod-log-sql-mysql that I maintain, it will:

- centralize all of your Apache logs in MySQL
- maintain a monthly statistic MySQL table

It is said to work with libdbi (that I also maintain), but I never
tried, as I don't use it.

All this is for bandwidth ACCOUNTING. Now if you need to do bandwidth
throttling, then there are many other apache modules for this. The issue
might be to connect the 2 together.

Please let me know your findings, and if we don't find anything, then I
think we might need to start to work on it (together?)! :)

Thomas


Reply to: