2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <!--<modulesynopsis> is the root tag and must surround all other tags.
24 The sequence of tags is important and must be followed in order for
25 the document to validate. -->
27 <modulesynopsis metafile="mod_ratelimit.xml.meta">
28 <name>mod_ratelimit</name>
29 <description>Bandwidth Rate Limiting for Clients</description>
30 <status>Extension</status>
31 <sourcefile>mod_ratelimit.c</sourcefile>
32 <identifier>ratelimit_module</identifier>
33 <compatibility><code>rate-initial-burst</code> available in httpd 2.4.24 and later.</compatibility>
37 <p>Provides a filter named <code>RATE_LIMIT</code> to limit client bandwidth.
38 The throttling is applied to each HTTP response while it is transferred to the client,
39 and not aggregated at IP/client level.
40 The connection speed to be simulated is specified, in KiB/s, using the environment
41 variable <code>rate-limit</code>.</p>
43 <p>Optionally, an initial amount of burst data, in KiB, may be
44 configured to be passed at full speed before throttling to the
45 specified rate limit. This value is optional, and is set using
46 the environment variable <code>rate-initial-burst</code>.</p>
48 <example><title>Example Configuration</title>
49 <highlight language="config">
50 <Location "/downloads">
51 SetOutputFilter RATE_LIMIT
53 SetEnv rate-initial-burst 512
58 If the value specified for <code>rate-limit</code> causes integer overflow, the rate-limited will be disabled.
59 If the value specified for <code>rate-limit-burst</code> causes integer overflow, the burst will be disabled.