.\" Man page generated from reStructuredText. . .TH "CONGESTION.CONFIG" "5" "Mar 08, 2019" "7.1" "Apache Traffic Server" .SH NAME congestion.config \- Traffic Server congestion control configuration file . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .sp The \fI\%congestion.config\fP file (by default, located in \fB/usr/local/etc/trafficserver/\fP) 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 \fI\%congestion.config\fP file, navigate to the Traffic Server bin directory; then run the \fBtraffic_ctl config reload\fP 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 \fI\%congestion.config\fP file only if you enable the \fBproxy.config.http.congestion_control.enabled\fP option. .sp You can create rules in the congestion.config file to specify: .INDENT 0.0 .IP \(bu 2 Which origin servers Traffic Server tracks for congestion. .IP \(bu 2 The timeouts Traffic Server uses, depending on whether a server is congested. .IP \(bu 2 The page Traffic Server sends to the client when a server becomes congested. .IP \(bu 2 If Traffic Server tracks the origin servers per IP address or per hostname. .UNINDENT .SH FORMAT .sp Each line in \fI\%congestion.config\fP 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: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C primary_destination=value secondary_specifier=value action=value .ft P .fi .UNINDENT .UNINDENT .sp The following list shows possible primary destinations with allowed values. .INDENT 0.0 .TP .B \fBdest_domain\fP A requested domain name. .TP .B \fBdest_host\fP A requested hostname. .TP .B \fBdest_ip\fP A requested IP address. .TP .B \fBurl_regex\fP A regular expression (regex) to be found in a URL. .UNINDENT .sp 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. .INDENT 0.0 .TP .B \fBport\fP A requested URL port or range of ports. .TP .B \fBprefix\fP A prefix in the path part of a URL. .UNINDENT .sp The following list shows the possible tags and their allowed values. .INDENT 0.0 .TP .B \fBmax_connection_failures\fP Default: \fB5\fP The maximum number of connection failures allowed within the fail window described below before Traffic Server marks the origin server as congested. .TP .B \fBfail_window\fP Default: \fB120\fP seconds. The time period during which the maximum number of connection failures can occur before Traffic Server marks the origin server as congested. .TP .B \fBproxy_retry_interval\fP Default: \fB10\fP seconds. The number of seconds that Traffic Server waits before contacting a congested origin server again. .TP .B \fBclient_wait_interval\fP Default: \fB300\fP seconds. The number of seconds that the client is advised to wait before retrying the congested origin server. .TP .B \fBwait_interval_alpha\fP Default: \fB30\fP seconds The upper limit for a random number that is added to the wait interval. .TP .B \fBlive_os_conn_timeout\fP Default: \fB60\fP 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 failure. .TP .B \fBlive_os_conn_retries\fP Default: \fB2\fP The maximum number of retries allowed to the live (uncongested) origin server. .TP .B \fBdead_os_conn_timeout\fP Default: \fB15\fP seconds. The connection timeout to the congested origin server. .TP .B \fBdead_os_conn_retries\fP Default: \fB1\fP The maximum number of retries allowed to the congested origin server. .TP .B \fBmax_connection\fP Default: \fB\-1\fP The maximum number of connections allowed from Traffic Server to the origin server. .TP .B \fBerror_page\fP Default: \fB"congestion#retryAfter"\fP The error page sent to the client when a server is congested. You must enclose the value in quotes; .TP .B \fBcongestion_scheme\fP Default: \fB"per_ip"\fP Specifies if Traffic Server applies the rule on a per\-host (\fB"per_host"\fP) or per\-IP basis (\fB"per_ip"\fP). You must enclose the value in quotes. .sp For example: if the server \fBwww.host1.com\fP has two IP addresses and you use the tag value \fB"per_ip"\fP, then each IP address has its own number of connection failures and is marked as congested independently. If you use the tag value \fB"per_host"\fP and the server \fBwww.host1.com\fP is marked as congested, then both IP addresses are marked as congested. .UNINDENT .SH EXAMPLES .sp The following \fI\%congestion.config\fP rule configures Traffic Server to stop forwarding requests to the server \fBwww.host.com\fP 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. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C dest_host=www.host.com port=80 .ft P .fi .UNINDENT .UNINDENT .sp 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. .sp You can override any of the default tag values by adding configuration variables at the end of \fBrecords.config\fP as follows: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CONFIG proxy.config.http.congestion_control.default.tag INT|STRING value .ft P .fi .UNINDENT .UNINDENT .sp where tag is one of the tags described in the list under \fI\%congestion.config\fP and value is the value you want to use. .sp For example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CONFIG proxy.config.http.congestion_control.default.congestion_scheme STRING per_host .ft P .fi .UNINDENT .UNINDENT .sp \fBIMPORTANT:\fP .INDENT 0.0 .INDENT 3.5 Rules in the \fI\%congestion.config\fP file override the following variables in the \fBrecords.config\fP file: .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C 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 .ft P .fi .UNINDENT .UNINDENT .SH COPYRIGHT 2019, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .