You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian Dessent <br...@dessent.net> on 2004/01/11 10:01:16 UTC

Re: [users@httpd] bandwidth control - Part 2

Jason D wrote:

>     I posted a question about a week ago asking if anyone knows about
> throttling bandwidth per month per VHOST to no avail. I see stats saying
> that apache is running 60% of the web servers out there. But I can not find
> any information on the ability to limit the amount of bandwidth used per
> site per month. Seeing as how 99% of web hosting companies charge this way
> and 60% of the web is run on apache, does this mean that none of the apache
> sites are limiting bandwidth usage in this manor? That is somewhat of a
> rhetorical question / rant due to frustration of not being able to educate
> myself on how to limit bandwidth with apache 2.x. But really what is being
> used to enforce the limits put into place at the point of sale with
> commercial web hosting sites running apache? I know that out of that 60%
> Does anyone on this list use apache to host sites with bandwidth
> limitations?

CPanel and Plesk do this, and they are the most popular webhosting
front-ends.  I think CPanel essentially creates a 'transfer' log for
each vhost, which logs simply the time and # of bytes for each request. 
I think at some frequency there's some process that sums these logs and
handles the accounting.  When a vhost goes over its limit, further
requests generate a 500 error code with a short "Over bandwidth" error. 
It also uses some Apache modules.  If you look at the server signiture
of a host that's running CPanel, you'll see something like:

Server: Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2
mod_bwlimited/1.4 PHP/4.3.4 FrontPage/5.0.2.2634 mod_ssl/2.8.16
OpenSSL/0.9.6b

You should google for mod_bwlimited and mod_log_bytes, but I believe one
or both of them are CPanel-proprietary.  One problem googling for these
is that you are going to get piles and piles of random people's <?
phpinfo() ?> pages.  You'll probably want to add "-phpinfo" and some
other negative keywords to your google query to restrict the search.

But, if you're using 2.x then I think the chances of finding a module to
do this go way down, and so you'll be back to the method of keeping
transfer logs and a periodic cron job to do the summing.

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] bandwidth control - Part 2

Posted by Jason D <ja...@codepanzyz.com>.
Ok guys,
   Thanks for the tips on " mod_bwlimited and mod_log_bytes and CPanel and
Plesk " that sould give me something to research for a while. See if any of
this will work on my setup. I guess apache 2.x is still not ready for
production level servers. I did not start messing around with apache untill
after 2.x was released. I guess I should have looked at what the differences
were before jumping at the bigger version number seeing as how most tips
point to 1.3 ;-)
   Thanks again,


 ----- Original Message ----- 
From: "Brian Dessent" <br...@dessent.net>
To: <us...@httpd.apache.org>
Sent: Sunday, January 11, 2004 1:01 AM
Subject: Re: [users@httpd] bandwidth control - Part 2


> Jason D wrote:
>
> >     I posted a question about a week ago asking if anyone knows about
> > throttling bandwidth per month per VHOST to no avail. I see stats saying
> > that apache is running 60% of the web servers out there. But I can not
find
> > any information on the ability to limit the amount of bandwidth used per
> > site per month. Seeing as how 99% of web hosting companies charge this
way
> > and 60% of the web is run on apache, does this mean that none of the
apache
> > sites are limiting bandwidth usage in this manor? That is somewhat of a
> > rhetorical question / rant due to frustration of not being able to
educate
> > myself on how to limit bandwidth with apache 2.x. But really what is
being
> > used to enforce the limits put into place at the point of sale with
> > commercial web hosting sites running apache? I know that out of that 60%
> > Does anyone on this list use apache to host sites with bandwidth
> > limitations?
>
> CPanel and Plesk do this, and they are the most popular webhosting
> front-ends.  I think CPanel essentially creates a 'transfer' log for
> each vhost, which logs simply the time and # of bytes for each request.
> I think at some frequency there's some process that sums these logs and
> handles the accounting.  When a vhost goes over its limit, further
> requests generate a 500 error code with a short "Over bandwidth" error.
> It also uses some Apache modules.  If you look at the server signiture
> of a host that's running CPanel, you'll see something like:
>
> Server: Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2
> mod_bwlimited/1.4 PHP/4.3.4 FrontPage/5.0.2.2634 mod_ssl/2.8.16
> OpenSSL/0.9.6b
>
> You should google for mod_bwlimited and mod_log_bytes, but I believe one
> or both of them are CPanel-proprietary.  One problem googling for these
> is that you are going to get piles and piles of random people's <?
> phpinfo() ?> pages.  You'll probably want to add "-phpinfo" and some
> other negative keywords to your google query to restrict the search.
>
> But, if you're using 2.x then I think the chances of finding a module to
> do this go way down, and so you'll be back to the method of keeping
> transfer logs and a periodic cron job to do the summing.
>
> Brian
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] bandwidth control - Part 2

Posted by Jez Hancock <je...@munk.nu>.
On Sun, Jan 11, 2004 at 01:01:16AM -0800, Brian Dessent wrote:
> Jason D wrote:
> 
> >     I posted a question about a week ago asking if anyone knows about
> > throttling bandwidth per month per VHOST to no avail. I see stats saying
> > that apache is running 60% of the web servers out there. But I can not find
> > any information on the ability to limit the amount of bandwidth used per
> > site per month. Seeing as how 99% of web hosting companies charge this way
> > and 60% of the web is run on apache, does this mean that none of the apache
> > sites are limiting bandwidth usage in this manor? That is somewhat of a
> > rhetorical question / rant due to frustration of not being able to educate
> > myself on how to limit bandwidth with apache 2.x. But really what is being
> > used to enforce the limits put into place at the point of sale with
> > commercial web hosting sites running apache? I know that out of that 60%
> > Does anyone on this list use apache to host sites with bandwidth
> > limitations?
> 
<snip>
> 
> Server: Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2
> mod_bwlimited/1.4 PHP/4.3.4 FrontPage/5.0.2.2634 mod_ssl/2.8.16
> OpenSSL/0.9.6b
> 
> You should google for mod_bwlimited and mod_log_bytes, but I believe one
> or both of them are CPanel-proprietary.  One problem googling for these
> is that you are going to get piles and piles of random people's <?
> phpinfo() ?> pages.  You'll probably want to add "-phpinfo" and some
> other negative keywords to your google query to restrict the search.
mod_log_bytes is actually apache copyrighted IIRC, but I remember when I
was admin'ing a server with cPanel on and tried to find more info out on
the module, I drew up a huge blank :(

If anyone knows the history of this little known module I'd love to here
about it :P

> But, if you're using 2.x then I think the chances of finding a module to
> do this go way down, and so you'll be back to the method of keeping
> transfer logs and a periodic cron job to do the summing.
I believe mod_accounting works ok on 2.x which is a bonus :P

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/
http://jez.hancock-family.com/  - personal weblog
http://ipfwstats.sf.net/        - ipfw peruser traffic logging

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org