Apache HTTP Server Version 2.4

| Description: | Bandwidth Rate Limiting for Clients |
|---|---|
| Status: | Extension |
| Module Identifier: | ratelimit_module |
| Source File: | mod_ratelimit.c |
| Compatibility: |
rate-initial-burst available in httpd 2.4.24 and later.
Rate limiting proxied content does not work correctly up to httpd 2.4.33.
|
Provides a filter named RATE_LIMIT to limit client bandwidth.
The throttling is applied to each HTTP response while it is transferred to the client,
and not aggregated at IP/client level.
The connection speed to be simulated is specified, in KiB/s, using the environment
variable rate-limit.
Optionally, an initial amount of burst data, in KiB, may be
configured to be passed at full speed before throttling to the
specified rate limit. This value is optional, and is set using
the environment variable rate-initial-burst.
Rate limiting is implemented by sleeping between writes to the client,
so each rate-limited response occupies a server thread (or process) for
the entire, deliberately prolonged, duration of the transfer. This applies
to all MPMs, including event. A modest number of slow,
rate-limited downloads can exhaust the server's available workers and
prevent other requests from being served. Use this module with caution,
limit it to the resources that need it, and size
MaxRequestWorkers accordingly.
<Location "/downloads">
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 400
SetEnv rate-initial-burst 512
</Location>
rate-limit causes integer overflow, the rate-limited will be disabled.
If the value specified for rate-limit-burst causes integer overflow, the burst will be disabled.
This module provides no directives.