Summer Of Code Project :
Bandwidth Limiter For Apache
|
|
   Welcome to the Homepage of my Project. Summer Of Code : Bandwidth Mod.
At this page i'll put all the info related to my work. How it works, how is written,
and full source with documentation. In english and spanish.
Bandwidth Mod v0.7
Project Information
Developer | : Ivan Barrera A. |
Location | : Santiago, Chile. |
Mentoring Organization | : Apache Software Foundation |
Mentors | : Ian Holsman, Paul Querna |
Project | : httpd-mod-bandwidth-limit |
|
Details :
The httpd web server doesn't really have a way to control how much
resources a given virtual host can have/ a user can request.
This module should be able to limit access to certain areas
of the website and to limit mailicious users
Thanks
Thanks goes for all the Google and Apache Team.
Special Thanks for Chris Dibona at Google, and Ian Holsman at Apache,
who created and helped me and everyone on this great chance at the Summer Of Code.
|
Limit Bandwidth (Per Vhost/Directory)
The main goal, is to be able to "assign" a maximum (or fixed) bandwidth available to a vhost.
This is achieved inserting small delays while sending the data, thus limiting the top speed a client can use.
In example, if we assign 100kb to a vhost, the first user will be able to download at 100kb. If another user starts
downloading, each will be able to get 50kb/s max... A third, 33kb/s each.. and so on.
Portability
Using the APR api, portability is almost assured. Current software has been succesfully tested on many platforms:
x86/x86-64 Sparc PPC mips, as well in many OS, such as : Linux, FreeBSD, MacOSX, Windows, Solaris.
Documentation
Documenting every part of the source code, as well as having a detailed documentation to the configuration, is a main part of the project. Documentation will be available in english and spanish. Source code will be commented in english.
|
|
What does it do ?
The mod works as an output filter in the apache filters chain.
When a user start downloading something, the data goes through the mod. If there is a bandwidth limit,
then the mod will start "splitting" the data into smaller pieces. Then it will start sending each
piece with a small delay (less than 1 sec) between each piece, thus, reducing the speed the user downloads.
This is useful for small web-hosting servers with limited outbound bandwidth (i.e. ADSLs customers).
Advanced Stuff
One of the difficulties doing this, is that on some MPMs (i.e. prefork) data is not available through
processes. So, the mod need to allocate a shared memory space to store data.
Also there is a function that allows to limit the maximum number of clients downloading data at once.
However, this is experimental. More details at the Documentation.
|
|
Project Downloads
Bandwidth Mod (or mod_bw) is available under the ASL v2.0.
This is the latest version of the mod available. Future releases will be updated on the site.
Get Bandwidth Mod v0.7 (Source Code)
Get Bandwidth Mod v0.7 (Windows DLL for 2.0.54)
Get Bandwidth Mod v0.7 Project (Visual C++ 6 Project)
All files contains the Documentation, the license file, and the source code of the mod.
You can also see the documentation online here
And the instruccions on how to build on Windows, here
You can browse the CVS, other files, and forums at SourceForge Project Homepage
|