congestion.config - Traffic Server congestion control configuration file
file (by default, located in
) enables you to configure Traffic Server
to stop forwarding HTTP requests to origin servers when they become congested,
and then send the client a message to retry the congested origin server later.
After you modify the congestion.config
file, navigate to the Traffic
Server bin directory; then run the traffic_ctl config reload
apply changes. When you apply the changes to a node in a cluster, Traffic
Server automatically applies the changes to all other nodes in the cluster.
Traffic Server uses the congestion.config
file only if you enable the
You can create rules in the congestion.config file to specify:
- Which origin servers Traffic Server tracks for
- The timeouts Traffic Server uses, depending on whether a
server is congested.
- The page Traffic Server sends to the client when a server
- If Traffic Server tracks the origin servers per IP address
or per hostname.
Each line in congestion.config
must follow the format below. Traffic
Server applies the rules in the order listed, starting at the top of the file.
Traffic Server recognizes three space-delimited tags:
primary_destination=value secondary_specifier=value action=value
The following list shows possible primary destinations with allowed values.
- A requested domain name.
- A requested hostname.
- A requested IP address.
- A regular expression (regex) to be found in a URL.
The secondary specifiers are optional in the congestion.config file. The
following list shows possible secondary specifiers with allowed values. You
can use more than one secondary specifier in a rule; however, you cannot
repeat a secondary specifier.
- A requested URL port or range of ports.
- A prefix in the path part of a URL.
The following list shows the possible tags and their allowed values.
- Default: 5 The maximum number of connection failures
allowed within the fail window described below before Traffic Server marks
the origin server as congested.
- Default: 120 seconds. The time period during which
the maximum number of connection failures can occur before Traffic Server
marks the origin server as congested.
- Default: 10 seconds. The number of seconds that
Traffic Server waits before contacting a congested origin server
- Default: 300 seconds. The number of seconds that the
client is advised to wait before retrying the congested origin
- Default: 30 seconds The upper limit for a random
number that is added to the wait interval.
- Default: 60 seconds. The connection timeout to the
live (uncongested) origin server. If a client stops a request before the
timeout occurs, then Traffic Server does not record a connection
- Default: 2 The maximum number of retries allowed to
the live (uncongested) origin server.
- Default: 15 seconds. The connection timeout to the
congested origin server.
- Default: 1 The maximum number of retries allowed to
the congested origin server.
- Default: -1 The maximum number of connections
allowed from Traffic Server to the origin server.
- Default: "congestion#retryAfter" The error
page sent to the client when a server is congested. You must enclose the
value in quotes;
- Default: "per_ip" Specifies if Traffic
Server applies the rule on a per-host ( "per_host") or
per-IP basis ( "per_ip"). You must enclose the value in
For example: if the server www.host1.com has two IP addresses and you
use the tag value "per_ip", then each IP address has its
own number of connection failures and is marked as congested
independently. If you use the tag value "per_host" and
the server www.host1.com is marked as congested, then both IP
addresses are marked as congested.
The following congestion.config
rule configures Traffic Server to stop
forwarding requests to the server www.host.com
on port 80 (HTTP
traffic) if the server is congested, according to the timeouts specified.
Traffic Server uses the default tag values because no tag has been specified.
You can use one or more tags in a rule, but each tag must have one value only.
If you specify no tags in the rule, then Traffic Server uses the default
You can override any of the default tag values by adding configuration variables
at the end of records.config
CONFIG proxy.config.http.congestion_control.default.tag INT|STRING value
where tag is one of the tags described in the list under
and value is the value you want to use.
CONFIG proxy.config.http.congestion_control.default.congestion_scheme STRING per_host
Rules in the congestion.config file
override the following variables in the records.config file: