tachtler:apache_http_server_-_mod_cband_-_bandbreitenbeschraenkung
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
tachtler:apache_http_server_-_mod_cband_-_bandbreitenbeschraenkung [2009/09/21 10:25] – Externe Bearbeitung 127.0.0.1 | tachtler:apache_http_server_-_mod_cband_-_bandbreitenbeschraenkung [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Apache HTTP Server - mod_cband - Bandbreitenbeschränkung ====== | ||
- | |||
- | Das '' | ||
- | |||
- | ===== Herunterladen ===== | ||
- | |||
- | Das [[http:// | ||
- | |||
- | * [[http:// | ||
- | |||
- | Die aktuelle Version bei der Erstellung dieses Artikels ist '' | ||
- | |||
- | ===== Installieren ===== | ||
- | |||
- | Nach dem herunterladen einer Version von [[http:// | ||
- | < | ||
- | mod-cband-0.9.7.5.tgz | ||
- | </ | ||
- | im Verzeichnis ''/ | ||
- | |||
- | Das heruntergeladene //Archiv// mit dem Namen '' | ||
- | < | ||
- | $ tar xvfz mod-cband-0.9.7.5.tgz | ||
- | </ | ||
- | |||
- | Anschließend sollte sich ein Verzeichnis mit dem Namen '' | ||
- | < | ||
- | # ll /tmp/ | ||
- | ... | ||
- | drwxr-xr-x 5 root root 4096 Nov 14 2006 mod-cband-0.9.7.5 | ||
- | -rw-r--r-- 1 root root 70713 Jun 1 22:38 mod-cband-0.9.7.5.tgz | ||
- | ... | ||
- | </ | ||
- | |||
- | Abschliessend kann das heruntergeladene //Archiv// '' | ||
- | < | ||
- | $ rm / | ||
- | </ | ||
- | |||
- | Ab hier werden '' | ||
- | < | ||
- | $ su - | ||
- | Password: | ||
- | </ | ||
- | |||
- | Mit nachfolgendem Befehl ist nun eine Wechsel ins Verzeichnis ''/ | ||
- | < | ||
- | # cd / | ||
- | </ | ||
- | |||
- | ==== httpd-devel installieren ==== | ||
- | |||
- | :!: **WICHTIG** - Bevor mit dem nächsten Schritt, der Kompilation von [[http:// | ||
- | * httpd-devel | ||
- | installiert ist. Dies kann mit nachfolgendem Befehl überprüft werden: | ||
- | |||
- | **Paket installiert** | ||
- | < | ||
- | Loaded plugins: fastestmirror, | ||
- | Loading mirror speeds from cached hostfile | ||
- | * rpmforge: ftp-stud.fht-esslingen.de | ||
- | * base: centos.intergenia.de | ||
- | * updates: centos.intergenia.de | ||
- | * addons: centos.intergenia.de | ||
- | * extras: centos.intergenia.de | ||
- | 424 packages excluded due to repository priority protections | ||
- | Installed Packages | ||
- | httpd-devel.i386 | ||
- | </ | ||
- | |||
- | **Paket NICHT installiert** | ||
- | < | ||
- | # yum list httpd-devel | ||
- | Loaded plugins: fastestmirror, | ||
- | Loading mirror speeds from cached hostfile | ||
- | * rpmforge: ftp-stud.fht-esslingen.de | ||
- | * base: centos.intergenia.de | ||
- | * updates: centos.intergenia.de | ||
- | * addons: centos.intergenia.de | ||
- | * extras: centos.intergenia.de | ||
- | 424 packages excluded due to repository priority protections | ||
- | Available Packages | ||
- | httpd-devel.i386 | ||
- | </ | ||
- | |||
- | Falls wie hier am **Ende der letzten Zeile** wie oben gezeigt **updates** und **NICHT** - **installed** steht, ist mit nachfolgendem Befehl, noch das Paket '' | ||
- | < | ||
- | # yum install httpd-devel | ||
- | Loaded plugins: fastestmirror, | ||
- | Loading mirror speeds from cached hostfile | ||
- | * rpmforge: ftp-stud.fht-esslingen.de | ||
- | * base: centos.intergenia.de | ||
- | * updates: centos.intergenia.de | ||
- | * addons: centos.intergenia.de | ||
- | * extras: centos.intergenia.de | ||
- | 424 packages excluded due to repository priority protections | ||
- | Setting up Install Process | ||
- | Parsing package install arguments | ||
- | Resolving Dependencies | ||
- | --> Running transaction check | ||
- | ---> Package httpd-devel.i386 0: | ||
- | --> Processing Dependency: apr-devel for package: httpd-devel | ||
- | --> Processing Dependency: apr-util-devel for package: httpd-devel | ||
- | --> Running transaction check | ||
- | ---> Package apr-devel.i386 0: | ||
- | ---> Package apr-util-devel.i386 0: | ||
- | --> Finished Dependency Resolution | ||
- | |||
- | Dependencies Resolved | ||
- | |||
- | ================================================================================ | ||
- | | ||
- | ================================================================================ | ||
- | Installing: | ||
- | | ||
- | Installing for dependencies: | ||
- | | ||
- | | ||
- | |||
- | Transaction Summary | ||
- | ================================================================================ | ||
- | Install | ||
- | Update | ||
- | Remove | ||
- | |||
- | Total download size: 429 k | ||
- | Is this ok [y/N]: y | ||
- | Downloading Packages: | ||
- | (1/3): apr-util-devel-1.2.7-7.el5_3.2.i386.rpm | ||
- | (2/3): httpd-devel-2.2.3-22.el5.centos.2.i386.rpm | ||
- | (3/3): apr-devel-1.2.7-11.el5_3.1.i386.rpm | ||
- | -------------------------------------------------------------------------------- | ||
- | Total 423 kB/s | 429 kB | ||
- | Running rpm_check_debug | ||
- | Running Transaction Test | ||
- | Finished Transaction Test | ||
- | Transaction Test Succeeded | ||
- | Running Transaction | ||
- | Installing | ||
- | Installing | ||
- | Installing | ||
- | |||
- | Installed: httpd-devel.i386 0: | ||
- | Dependency Installed: apr-devel.i386 0: | ||
- | Complete! | ||
- | </ | ||
- | |||
- | ==== mod_cband kompilieren ==== | ||
- | |||
- | Der nächste Schritt wäre nun die Überprüfung, | ||
- | < | ||
- | # ./ | ||
- | </ | ||
- | |||
- | Die Anzeige sollte nach vielen Ausgaben, welche z.B. wie folgt aussehen: | ||
- | < | ||
- | checking for gcc... gcc | ||
- | checking for C compiler default output file name... a.out | ||
- | checking whether the C compiler works... yes | ||
- | ... | ||
- | </ | ||
- | und mit einer Anzeige enden, die in etwa wie folgt aussieht: | ||
- | < | ||
- | ... | ||
- | configure: creating ./ | ||
- | config.status: | ||
- | </ | ||
- | |||
- | Jetzt kann das " | ||
- | < | ||
- | # make | ||
- | |||
- | apxs -Wc,-Wall -Wc, | ||
- | / | ||
- | --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing | ||
- | -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/ | ||
- | -c -o src/ | ||
- | src/ | ||
- | src/ | ||
- | / | ||
- | src/ | ||
- | |||
- | write "make install" | ||
- | |||
- | </ | ||
- | Falls keine Fehler aufgetreten sein sollten, kann abschließend dann die eigentliche Installation mit folgendem Befehl durchgeführt werden: | ||
- | < | ||
- | # make install | ||
- | apxs -Wc,-Wall -Wc, | ||
- | / | ||
- | / | ||
- | cp src/ | ||
- | cp src/ | ||
- | cp src/ | ||
- | chmod 644 / | ||
- | ranlib / | ||
- | PATH=" | ||
- | ---------------------------------------------------------------------- | ||
- | Libraries have been installed in: | ||
- | / | ||
- | |||
- | If you ever happen to want to link against installed libraries | ||
- | in a given directory, LIBDIR, you must either use libtool, and | ||
- | specify the full pathname of the library, or use the `-LLIBDIR' | ||
- | flag during linking and do at least one of the following: | ||
- | - add LIBDIR to the `LD_LIBRARY_PATH' | ||
- | | ||
- | - add LIBDIR to the `LD_RUN_PATH' | ||
- | | ||
- | - use the `-Wl, | ||
- | - have your system administrator add LIBDIR to `/ | ||
- | |||
- | See any operating system documentation about shared libraries for | ||
- | more information, | ||
- | ---------------------------------------------------------------------- | ||
- | chmod 755 / | ||
- | [activating module `cband' | ||
- | </ | ||
- | |||
- | ===== Konfiguration ===== | ||
- | |||
- | Die Konfiguration von [[http:// | ||
- | |||
- | ==== / | ||
- | |||
- | Folgende zusätzlich Eintragungen in der Konfigurationsdatei ''/ | ||
- | < | ||
- | ... | ||
- | # | ||
- | # Dynamic Shared Object (DSO) Support | ||
- | # | ||
- | # To be able to use the functionality of a module which was built as a DSO you | ||
- | # have to place corresponding `LoadModule' | ||
- | # directives contained in it are actually available _before_ they are used. | ||
- | # Statically compiled modules (those listed by `httpd -l') do not need | ||
- | # to be loaded here. | ||
- | # | ||
- | # Example: | ||
- | # LoadModule foo_module modules/ | ||
- | # | ||
- | ... | ||
- | ... | ||
- | ... | ||
- | LoadModule cband_module modules/ | ||
- | ... | ||
- | </ | ||
- | |||
- | Um die **Performance** von [[http:// | ||
- | < | ||
- | ... | ||
- | CBandRandomPulse On | ||
- | ... | ||
- | </ | ||
- | |||
- | **Erklärung** | ||
- | ^ Bescheibung | ||
- | | Name | **CBandRandomPulse** | ||
- | | Description | ||
- | | | Random pulse generator is a part of the speed-limiting implementation of mod_cband. \\ This directive changes the way a connection' | ||
- | | Context | ||
- | | Syntax | ||
- | |||
- | ==== / | ||
- | |||
- | Eine mögliche Konfiguration eines " | ||
- | |||
- | Folgende Bandbreitenbeschränkungen sollen dabei zum Einsatz kommen: | ||
- | |||
- | * Banbreitenbeschränkung für '' | ||
- | * Banbreitenbeschränkung für das interne Netzwerk '' | ||
- | * Banbreitenbeschränkung für die externe IP-Adresse '' | ||
- | * Banbreitenbeschränkung für alle anderen - **Bandbreite 512kbps, 10 Anfragen pro Sekunde, 8 gleichzeitige Verbindungen** | ||
- | |||
- | Bevor wir jedoch mit dem Konfigurieren des " | ||
- | < | ||
- | # touch / | ||
- | </ | ||
- | |||
- | :!: **WICHTIG** - Die Datei muss für den Benutzer, welcher für den [[http:// | ||
- | |||
- | Um die Besitz- und Zugriffsrechte richtig zu setzen sind nachfolgende Befehle notwendig. Zum setzen der richtigen Besitzrechte: | ||
- | < | ||
- | # chown apache.apache / | ||
- | </ | ||
- | und der richtigen Schreibrechte: | ||
- | < | ||
- | # chmod 740 / | ||
- | </ | ||
- | |||
- | Nach der Anlage der Statistik-Datei, | ||
- | < | ||
- | # | ||
- | # Tachtler | ||
- | # Configuration global settings mod_cband | ||
- | # | ||
- | < | ||
- | < | ||
- | CBandClassDst 127.0.0.0/8 | ||
- | </ | ||
- | |||
- | < | ||
- | CBandClassDst 192.168.0.0/ | ||
- | </ | ||
- | |||
- | < | ||
- | CBandClassDst 88.217.171.167/ | ||
- | </ | ||
- | </ | ||
- | ... | ||
- | ... | ||
- | ... | ||
- | # | ||
- | # dokuwiki.tachtler.net | ||
- | # | ||
- | < | ||
- | ServerAdmin webmaster@tachtler.net | ||
- | ServerName dokuwiki.tachtler.net | ||
- | ServerAlias www.dokuwiki.tachtler.net | ||
- | ServerPath / | ||
- | DocumentRoot "/ | ||
- | < | ||
- | Options FollowSymLinks | ||
- | AllowOverride None | ||
- | Order allow, | ||
- | Allow from all | ||
- | </ | ||
- | DirectoryIndex index.php | ||
- | ErrorLog logs/ | ||
- | CustomLog logs/ | ||
- | |||
- | # Tachtler (mod_cband) | ||
- | < | ||
- | # Specifies maximal speed for any remote client from some destination class | ||
- | # CBandClassRemoteSpeed class_name kbps rps | ||
- | # class_name - name of defined destination class | ||
- | # kbps - maximal transfer speed in kbps or kB/s | ||
- | # rps - maximal requests per second | ||
- | # max_conn - maximal number of simultaneous connections | ||
- | CBandClassRemoteSpeed class_localhost 1024kbps 12 10 | ||
- | CBandClassRemoteSpeed class_internal_network 1024kbps 12 10 | ||
- | CBandClassRemoteSpeed class_external_network 1024kbps 12 10 | ||
- | |||
- | # Specifies a maximal speed for a virtualhost | ||
- | # kbps - maximal transfer speed in kbps or kB/s | ||
- | # rps - maximal requests per second | ||
- | # max_conn - maximal number of simultaneous connections | ||
- | CBandSpeed 512kbps 10 8 | ||
- | |||
- | # Specifies virtualhost' | ||
- | CBandScoreBoard / | ||
- | </ | ||
- | |||
- | </ | ||
- | ... | ||
- | </ | ||
- | |||
- | ==== / | ||
- | |||
- | [[http:// | ||
- | |||
- | Dafür muss die Definition innerhalb der Konfigurationsdatei ''/ | ||
- | |||
- | Folgende Anpassung an ''/ | ||
- | < | ||
- | ... | ||
- | < | ||
- | SetHandler cband-status | ||
- | </ | ||
- | ... | ||
- | </ | ||
- | |||
- | Der komplette " | ||
- | < | ||
- | # | ||
- | # Tachtler | ||
- | # Configuration global settings mod_cband | ||
- | # | ||
- | < | ||
- | < | ||
- | CBandClassDst 127.0.0.0/8 | ||
- | </ | ||
- | |||
- | < | ||
- | CBandClassDst 192.168.0.0/ | ||
- | </ | ||
- | |||
- | < | ||
- | CBandClassDst 88.217.171.167/ | ||
- | </ | ||
- | </ | ||
- | ... | ||
- | ... | ||
- | ... | ||
- | # | ||
- | # dokuwiki.tachtler.net | ||
- | # | ||
- | < | ||
- | ServerAdmin webmaster@tachtler.net | ||
- | ServerName dokuwiki.tachtler.net | ||
- | ServerAlias www.dokuwiki.tachtler.net | ||
- | ... | ||
- | < | ||
- | SetHandler cband-status | ||
- | </ | ||
- | ... | ||
- | </ | ||
- | </ | ||
- | |||
- | Der Aufruf kann dann durch anhängen an die Adresse des " | ||
- | * [[http:// | ||
- | |||
- | {{: | ||
- | |||
- | ===== Neustart Apache HTTP Server ===== | ||
- | |||
- | Ein erneuter oder erster Start des [[http:// | ||
- | < | ||
- | # service httpd start | ||
- | </ | ||
- | oder einen erneuten Start des [[http:// | ||
- | < | ||
- | # service httpd restart | ||
- | </ | ||
- | macht die oben beschriebenen Konfigurationen für den [[http:// | ||
- | |||
- | ===== Dokumentation mod_cband ===== | ||
- | |||
- | Die Dokumentation von [[http:// | ||
- | * **''/ | ||
- | |||
- | :!: Nachfolgend der Auszüge aus ''''/ | ||
- | |||
- | ==== Units accepted in various directives ==== | ||
- | |||
- | < | ||
- | * transfer speeds: | ||
- | o kbps, Mbps, Gbps - multiples of "bits per second", | ||
- | o kb/s, Mb/s, Gb/s - multiples of "bytes per second", | ||
- | o defaults to kbps | ||
- | |||
- | * transfer quotas: | ||
- | o K, M, G - multiples of bytes, respectively: | ||
- | o Ki, Mi, Gi - multiples of bytes, respectively: | ||
- | o defaults to K | ||
- | |||
- | * time periods: | ||
- | o S, M, H, D, W - multiples of seconds: Seconds, Minutes, Hours, Days, Weeks; respectively: | ||
- | o defaults to S | ||
- | </ | ||
- | |||
- | ==== Directives ==== | ||
- | |||
- | < | ||
- | Name CBandDefaultExceededURL | ||
- | Description | ||
- | user when the configured transfer limit is exceeded | ||
- | NOTE: If you don't specify the exceeded URL location then standard 503 Service Unavailable | ||
- | will be sent | ||
- | Context | ||
- | Syntax | ||
- | </ | ||
- | < | ||
- | Name CBandDefaultExceededCode | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | Example | ||
- | </ | ||
- | < | ||
- | Name CBandScoreFlushPeriod | ||
- | Description | ||
- | Use this to improve mod_cband' | ||
- | Default | ||
- | Context | ||
- | Syntax | ||
- | Example | ||
- | Any virtualhost' | ||
- | </ | ||
- | < | ||
- | Name CBandSpeed | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | kbps - maximal transfer speed in [kMG]bps or [kMG]B/s | ||
- | rps - maximal requests per second | ||
- | max_conn - maximal number of simultaneous connections | ||
- | Example | ||
- | Specifies maximal speed 1024kbps (1024 * 1024 bits per second), | ||
- | maximal 10 requests per second and with a maximum of 30 open connections | ||
- | NOTE: This feature is available from version 0.9.6.0 | ||
- | </ | ||
- | < | ||
- | Name CBandRemoteSpeed | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | kbps - maximal transfer speed in [kMG]bps or [kMG]B/s | ||
- | rps - maximal requests per second | ||
- | max_conn - maximal number of simultaneous connections | ||
- | Example | ||
- | Specifies maximal speed 20kB/s (20 * 1024 bytes per second), | ||
- | maximal 3 requests per second and 3 open connections for any remote client | ||
- | NOTE: This feature is available from version 0.9.6.1-rc2 | ||
- | </ | ||
- | < | ||
- | Name CBandClassRemoteSpeed | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | class_name - name of defined destination class | ||
- | kbps - maximal transfer speed in kbps or kB/s | ||
- | rps - maximal requests per second | ||
- | max_conn - maximal number of simultaneous connections | ||
- | Example | ||
- | CBandClassDst 66.249.64/ | ||
- | CBandClassDst 66.249.65/ | ||
- | CBandClassDst 66.249.79/ | ||
- | </ | ||
- | CBandClassRemoteSpeed googlebot_class 20kb/s 2 3 | ||
- | |||
- | Specifies maximal speed 20kB/s (20 * 1024 bytes per second), | ||
- | maximal 2 requests per second and 3 open connections for any remote client from | ||
- | class googlebot_class | ||
- | NOTE: This feature is available from version 0.9.6.1-rc2 | ||
- | </ | ||
- | < | ||
- | Name CBandRandomPulse | ||
- | Description | ||
- | Random pulse generator is a part of the speed-limiting implementation of mod_cband. | ||
- | This directive changes the way a connection' | ||
- | The connections' | ||
- | that period. When r.p.g. is enabled this period is chosen randomly, | ||
- | providing for a statisticaly saner load distribution. Disabling this causes spikes both in | ||
- | bandwidth and cpu usages | ||
- | Context | ||
- | Syntax | ||
- | </ | ||
- | < | ||
- | Name CBandLimit | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | limit - bandwidth quota size, available units: K (kilo), M (mega), G (giga), Ki (kibi), | ||
- | Mi (mebi), Gi (gibi) | ||
- | Example | ||
- | Specifies 10 * 1000 * 1000 bytes bandwidth quota | ||
- | |||
- | CBandLimit 10Mi | ||
- | Specifies 10 * 1024 * 1024 bytes bandwidth quota | ||
- | </ | ||
- | < | ||
- | Name CBandClassLimit | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | class_name - the name of defined class | ||
- | limit - bandwidth quota size, available units: K (kilo), M (mega), G (giga), Ki (kibi), | ||
- | Mi (mebi), Gi (gibi) | ||
- | </ | ||
- | < | ||
- | Name CBandExceededURL | ||
- | Description | ||
- | configured transfer limit is exceeded | ||
- | | ||
- | NOTE: If you don't specify the exceeded URL location then standard 503 Service Unavailable will be sent | ||
- | |||
- | Context | ||
- | Syntax | ||
- | </ | ||
- | < | ||
- | Name CBandExceededSpeed | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | kbps - maximal transfer speed in kbps or kB/s | ||
- | rps - maximal requests per second | ||
- | max_conn - maximal number of simultaneous connections | ||
- | NOTE: This feature is available from version 0.9.6.0 | ||
- | </ | ||
- | < | ||
- | Name CBandScoreboard | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | NOTE: The path must be writeable for the apache-user | ||
- | </ | ||
- | < | ||
- | Name CBandPeriod | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | period - available units: S (seconds), M (minutes), H (hours), D (days), W (weeks) | ||
- | Example | ||
- | CBandPeriod 14D | ||
- | CBandPeriod 60M | ||
- | </ | ||
- | < | ||
- | Name CBandPeriodSlice | ||
- | Description | ||
- | Default | ||
- | Context | ||
- | Syntax | ||
- | Example | ||
- | CBandPeriod 4W | ||
- | CBandPeriodSlice 1W | ||
- | A period will be divided into 4 small slices (4W/1W = 4). Each slice has 100G/ | ||
- | bandwidth limit. After 1W slice limit will be 50G, after 2W will be 75G ... | ||
- | </ | ||
- | < | ||
- | Name < | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | </ | ||
- | < | ||
- | Name CBandUserSpeed | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | kbps - maximal transfer speed in kbps or kB/s | ||
- | rps - maximal requests per second | ||
- | max_conn - maximal number of simultaneous connections | ||
- | Example | ||
- | Specifies maximal speed 100 kB/s (100 * 1024 bytes per second), | ||
- | maximal 10 requests per second and 5 open connections | ||
- | NOTE: This feature is available from version 0.9.6.0 | ||
- | </ | ||
- | < | ||
- | Name CBandUserLimit | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | limit - bandwidth quota size, available units: K (kilo), M (mega), G (giga), Ki (kibi), | ||
- | Mi (mebi), Gi (gibi) | ||
- | Example | ||
- | Specifies 10 * 1000 * 1000 bytes bandwidth quota | ||
- | |||
- | CBandUserLimit 10Mi | ||
- | Specifies 10 * 1024 * 1024 bytes bandwidth quota | ||
- | </ | ||
- | < | ||
- | Name CBandUserClassLimit | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | class_name - the name of defined class | ||
- | limit - bandwidth quota size, available units: K (kilo), M (mega), G (giga), Ki (kibi), | ||
- | Mi (mebi), Gi (gibi) | ||
- | </ | ||
- | < | ||
- | Name CBandUserExceededURL | ||
- | Description | ||
- | configured transfer limit is exceeded | ||
- | |||
- | NOTE: If you don't specify the exceeded URL location then standard 503 Service Unavailable will be sent | ||
- | |||
- | Context | ||
- | Syntax | ||
- | </ | ||
- | < | ||
- | Name CBandUserExceededSpeed | ||
- | Description | ||
- | NOTE: | ||
- | CBandUserExceededSpeed directive | ||
- | Context | ||
- | Syntax | ||
- | kbps - maximal transfer speed in kbps or kB/s | ||
- | rps - maximal requests per second | ||
- | max_conn - maximal number of simultaneous connections | ||
- | NOTE: This feature is available from version 0.9.6.0 | ||
- | </ | ||
- | < | ||
- | Name CBandUserScoreboard | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | NOTE: The path must be writeable for the apache-user | ||
- | </ | ||
- | < | ||
- | Name CBandUserPeriod | ||
- | Description | ||
- | Context | ||
- | Syntax | ||
- | period - available units: S (seconds), M (minutes), H (hours), D (days), W (weeks) | ||
- | Example | ||
- | CBandUserPeriod 14D | ||
- | CBandUserPeriod 60M | ||
- | </ | ||
- | < | ||
- | Name CBandUserPeriodSlice | ||
- | Description | ||
- | Default | ||
- | Context | ||
- | Syntax | ||
- | Example | ||
- | CBandUserPeriod 4W | ||
- | CBandUserPeriodSlice 1W | ||
- | A period will be divided into 4 small slices (4W/1W = 4). Each slice has 100G/ | ||
- | bandwidth limit. After 1W slice limit will be 50G, after 2W will be 75G ... | ||
- | </ | ||
- | |||
- | ==== Status Handler Configuration Example ==== | ||
- | |||
- | < | ||
- | To view actual bandwidth limits, usages, users, scoreboards, | ||
- | |||
- | < | ||
- | SetHandler cband-status | ||
- | </ | ||
- | |||
- | < | ||
- | SetHandler cband-status-me | ||
- | </ | ||
- | |||
- | Then you can access the status page with a URL like: | ||
- | http:// | ||
- | http:// | ||
- | </ | ||
- | |||
- | < | ||
- | In versions > | ||
- | |||
- | http:// | ||
- | http:// | ||
- | </ | ||
tachtler/apache_http_server_-_mod_cband_-_bandbreitenbeschraenkung.1253521503.txt.gz · Zuletzt geändert: 2012/06/11 13:20 (Externe Bearbeitung)