|
| 1 | +.. include:: ../../common.defs |
| 2 | + |
| 3 | +.. _admin-plugins-connection-exempt-list: |
| 4 | + |
| 5 | +Connection Exempt List Plugin |
| 6 | +****************************** |
| 7 | + |
| 8 | +.. Licensed to the Apache Software Foundation (ASF) under one |
| 9 | + or more contributor license agreements. See the NOTICE file |
| 10 | + distributed with this work for additional information |
| 11 | + regarding copyright ownership. The ASF licenses this file |
| 12 | + to you under the Apache License, Version 2.0 (the |
| 13 | + "License"); you may not use this file except in compliance |
| 14 | + with the License. You may obtain a copy of the License at |
| 15 | +
|
| 16 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 17 | +
|
| 18 | + Unless required by applicable law or agreed to in writing, |
| 19 | + software distributed under the License is distributed on an |
| 20 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 21 | + KIND, either express or implied. See the License for the |
| 22 | + specific language governing permissions and limitations |
| 23 | + under the License. |
| 24 | +
|
| 25 | +Description |
| 26 | +=========== |
| 27 | + |
| 28 | +:ts:cv:`proxy.config.http.per_client.connection.exempt_list` allows |
| 29 | +administrators to set exemptions to the per-client connection limit. However, |
| 30 | +for large networks, managing this as a comma-separated string in |
| 31 | +:file:`records.yaml` can be cumbersome. This plugin allows administrators to set |
| 32 | +the exemption list :ts:cv:`proxy.config.http.per_client.connection.exempt_list` |
| 33 | +value via an external YAML file. |
| 34 | + |
| 35 | +Plugin Configuration |
| 36 | +==================== |
| 37 | + |
| 38 | +The plugin is configured as a global plugin and requires a path to a YAML |
| 39 | +configuration file. Load the plugin by adding a line to the |
| 40 | +:file:`plugin.config`: |
| 41 | + |
| 42 | +.. code-block:: text |
| 43 | +
|
| 44 | + connection_exempt_list.so /path/to/exempt_list.yaml |
| 45 | +
|
| 46 | +Configuration File Format |
| 47 | +========================== |
| 48 | + |
| 49 | +The exempt list configuration file must be in YAML format with the following |
| 50 | +simple structure: |
| 51 | + |
| 52 | +.. code-block:: yaml |
| 53 | +
|
| 54 | + exempt_list: |
| 55 | + - 127.0.0.1 |
| 56 | + - ::1 |
| 57 | + - 192.168.1.0/24 |
| 58 | + - 10.0.0.0/8 |
| 59 | +
|
| 60 | +The configuration file supports the same range formats as |
| 61 | +:ts:cv:`proxy.config.http.per_client.connection.exempt_list`. |
| 62 | + |
| 63 | +* Individual IPv4 addresses (e.g., ``192.168.1.100``) |
| 64 | +* Individual IPv6 addresses (e.g., ``::1``, ``2001:db8::1``) |
| 65 | +* IPv4 CIDR ranges (e.g., ``192.168.0.0/16``) |
| 66 | +* Ranges as a dash-separated string (e.g., ``10.0.0.0-10.0.0.255``) |
| 67 | + |
| 68 | +Example Usage |
| 69 | +============= |
| 70 | + |
| 71 | +1. Create an exempt list configuration file (e.g., |
| 72 | +``/opt/ats/etc/trafficserver/exempt_localhost.yaml``): |
| 73 | + |
| 74 | + .. code-block:: yaml |
| 75 | +
|
| 76 | + exempt_list: |
| 77 | + - 127.0.0.1 |
| 78 | + - ::1 |
| 79 | +
|
| 80 | +2. Enable the plugin in :file:`plugin.config`: |
| 81 | + |
| 82 | + .. code-block:: text |
| 83 | +
|
| 84 | + connection_exempt_list.so /opt/ats/etc/trafficserver/exempt_localhost.yaml |
| 85 | +
|
| 86 | +3. Configure per-client connection limits in :file:`records.yaml`: |
| 87 | + |
| 88 | + .. code-block:: yaml |
| 89 | +
|
| 90 | + records: |
| 91 | + net: |
| 92 | + per_client: |
| 93 | + max_connections_in: 300 |
| 94 | +
|
| 95 | +4. Start |TS|. The plugin will load the exempt list and not apply the per-client |
| 96 | + connection limit to the exempted IP addresses and ranges. |
| 97 | + |
| 98 | +See Also |
| 99 | +======== |
| 100 | + |
| 101 | +* :ts:cv:`proxy.config.net.per_client.max_connections_in` |
| 102 | +* :ts:cv:`proxy.config.http.per_client.connection.exempt_list` |
| 103 | +* :doc:`../files/plugin.config.en` |
0 commit comments