The congestion.config file 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_line -x command to 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 Congestion Control option.
You can create rules in the congestion.config file to specify:
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.
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.
The following list shows the possible tags and their allowed values.
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 quotes.
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.
dest_host=www.host.com port=80
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 values.
You can override any of the default tag values by adding configuration variables at the end of records.config as follows:
CONFIG proxy.config.http.congestion_control.default.tag INT|STRING value
where tag is one of the tags described in the list under congestion.config and value is the value you want to use.
For example:
CONFIG proxy.config.http.congestion_control.default.congestion_scheme STRING per_host
Important
Rules in the congestion.config file override the following variables in the records.config file:
proxy.config.http.connect_attempts_max_retries
proxy.config.http.connect_attempts_max_retries_dead_server
proxy.config.http.connect_attempts_rr_retries
proxy.config.http.connect_attempts_timeout
proxy.config.http.down_server.cache_time
proxy.config.http.down_server.abort_threshold