Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions ci/jenkins/bin/cache-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

PREFIX="${ATS_BUILD_BASEDIR}/install"
REMAP="${PREFIX}/etc/trafficserver/remap.config"
RECORDS="${PREFIX}/etc/trafficserver/records.config"

TWEAK=""
[ "1" == "$enable_tweak" ] && TWEAK="-tweak"
Expand Down Expand Up @@ -58,8 +57,7 @@ ${PREFIX}/bin/trafficserver stop

# Now run it again, maybe, with the tweaked configs
if [ "" != "$TWEAK" ]; then
# echo "CONFIG proxy.config.http.cache.required_headers INT 1" >> $RECORDS
echo "CONFIG proxy.config.http.negative_caching_enabled INT 1" >> $RECORDS
${PREFIX}/bin/traffic_ctl config set proxy.config.http.negative_caching_enabled 1 -c $RECORDS
${PREFIX}/bin/trafficserver start
cd /home/jenkins/cache-tests
npm run --silent cli --base=http://127.0.0.1:8080 > /CA/cache-tests/${ATS_BRANCH}${TWEAK}.json
Expand Down
7 changes: 6 additions & 1 deletion configs/records.yaml.default.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ ts:
# Thread configurations. Docs:
# https://docs.trafficserver.apache.org/records.yaml#thread-variables
##############################################################################
diags:
debug:
enabled: 0
tags: http|dns

exec_thread:
affinity: 1
autoconfig:
enabled: 1
scale: 1.13
scale: 1.0
limit: 2
http:
accept_no_activity_timeout: 120
Expand Down
19 changes: 14 additions & 5 deletions configs/remap.config.default
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
# 2) Protect the proxy server, to only allow certain requests.
#
# With the default configurations, at least one remap rule is required. This
# can be relaxed with the following configuration in records.config:
# can be relaxed with the following configuration in records.yaml:
#
# ts:
# url_remap:
# remap_required: 0
#
# CONFIG proxy.config.url_remap.remap_required INT 0
#
# Be aware, doing so makes the proxy a generic, open-relay!
#
Expand Down Expand Up @@ -96,13 +99,19 @@
# At least one regular expressions must be specified in order to activate
# 'deep linking protection'. There are limitations for the number of referer
# regular expression strings - 2048. In order to enable the 'deep linking
# protection' feature in Traffic Server, configure records.config with:
# protection' feature in Traffic Server, configure records.yaml with:
#
# ts:
# http:
# referer_filter: 1
#
# CONFIG proxy.config.http.referer_filter INT 1
#
# In order to enable run-time formatting for redirect0URL, configure
#
# CONFIG proxy.config.http.referer_format_redirect INT 1
# ts:
# http:
# referer_format_redirect: 1
#
#
# When run-time formatting for redirect-URL was enabled the following format
# symbols can be used:
Expand Down
2 changes: 1 addition & 1 deletion configs/ssl_multicert.config.default
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# is the leftmost domain component.
#
# The certificate file path, CA path and key path specified in
# records.config will be used for all certificates, CAs and keys
# records.yaml will be used for all certificates, CAs and keys
# specified here.
#
# Fields:
Expand Down
20 changes: 16 additions & 4 deletions doc/admin-guide/configuring-traffic-server.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,23 @@ full restart of Traffic Server.

The following is a sample portion of :file:`records.yaml`:

.. figure:: ../static/images/admin/records.jpg
:align: center
:alt: Sample records.config file

Sample records.config file
.. code-block:: yaml
:linenos:

diags:
debug:
enabled: 0
tags: http|dns

exec_thread:
affinity: 1
autoconfig:
enabled: 1
scale: 1.0
limit: 2

Sample records.yaml file

In addition to :file:`records.yaml`,
Traffic Server provides other configuration files that are used to
Expand Down
20 changes: 16 additions & 4 deletions doc/admin-guide/files/remap.config.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,25 @@ redirected to 'redirect-URL'.
At least one regular expressions must be specified in order to activate
'deep linking protection'. There are limitations for the number of referer
regular expression strings - 2048. In order to enable the 'deep linking
protection' feature in Traffic Server, configure records.config with::
protection' feature in Traffic Server, configure records.yaml with:

CONFIG proxy.config.http.referer_filter INT 1
.. code-block:: yaml
:linenos:
:emphasize-lines: 3

In order to enable run-time formatting for redirect URL, configure::
ts:
http:
referer_filter: 1

CONFIG proxy.config.http.referer_format_redirect INT 1
In order to enable run-time formatting for redirect URL, configure:

.. code-block:: yaml
:linenos:
:emphasize-lines: 3

ts:
http:
referer_format_redirect: 1

When run-time formatting for redirect-URL was enabled the following format
symbols can be used::
Expand Down
2 changes: 1 addition & 1 deletion doc/admin-guide/files/sni.yaml.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Pre-warming TLS Tunnel
=============================== ========================================================================================
Key Meaning
=============================== ========================================================================================
tunnel_prewarm Override :ts:cv:`proxy.config.tunnel.prewarm` in records.config.
tunnel_prewarm Override :ts:cv:`proxy.config.tunnel.prewarm` in records.yaml.

tunnel_prewarm_srv Enable SRV record lookup on pre-warming. Default is ``false``.

Expand Down
2 changes: 1 addition & 1 deletion doc/admin-guide/files/storage.config.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Server user is in the group which owns the device file. However, some
operating systems have stronger requirements - see the following examples for
more information.

As with standard ``records.config`` integers, human readable prefixes are also
As with standard ``records.yaml`` integers, human readable prefixes are also
supported. They include

- ``K`` Kilobytes (1024 bytes)
Expand Down
113 changes: 75 additions & 38 deletions doc/admin-guide/performance/index.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ On multi-socket servers, such as Intel architectures with NUMA, you can adjust
the thread affinity configuration to take advantage of cache pipelines and
faster memory access, as well as preventing possibly costly thread migrations
across sockets. This is adjusted with :ts:cv:`proxy.config.exec_thread.affinity`
in :file:`records.yaml`. ::
in :file:`records.yaml`.:

CONFIG proxy.config.exec_thread.affinity INT 1
.. code-block:: yaml

ts:
exec_thread:
affinity: 1

Thread Stack Size
~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -264,9 +268,12 @@ inactive (have not sent data). Lowering this timeout can ease pressure on the
proxy if misconfigured or misbehaving clients are opening a large number of
connections without submitting requests.

::

CONFIG proxy.config.http.accept_no_activity_timeout INT 120
.. code-block:: yaml

ts:
http:
accept_no_activity_timeout: 120

Background Fill Timeout
~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -278,9 +285,11 @@ server connection that was being used. Setting this to zero disables the
timeout, but modifying the value and enforcing a timeout may help in
situations where your origin servers stall connections without closing.

::
.. code-block:: yaml

CONFIG proxy.config.http.background_fill_active_timeout INT 0
ts:
http:
background_fill_active_timeout: 0

DNS Timeouts
~~~~~~~~~~~~
Expand All @@ -298,10 +307,13 @@ instance from updating its records to reflect external DNS record changes in a
timely manner (refer to :ts:cv:`proxy.config.hostdb.ttl_mode` for more
information on when this TTL value will actually be used).

::

CONFIG proxy.config.hostdb.timeout INT 1440
CONFIG proxy.config.hostdb.lookup_timeout INT 30
.. code-block:: yaml

ts:
hostdb:
lookup_timeout: 30
timeout: 1440

Keepalive Timeouts
~~~~~~~~~~~~~~~~~~
Expand All @@ -316,10 +328,12 @@ Both are specified in seconds. Keep in mind that
effectively an advisory maximum, as the origin server may have its own
keepalive timeout which (if set lower) will likely take precedence.

::
.. code-block:: yaml

CONFIG proxy.config.http.keep_alive_no_activity_timeout_in INT 120
CONFIG proxy.config.http.keep_alive_no_activity_timeout_out INT 120
ts:
http:
keep_alive_no_activity_timeout_in: 120
keep_alive_no_activity_timeout_out: 120

Origin Connection Timeouts
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -331,18 +345,24 @@ connection attempt until the origin fully establishes a connection (the connecti
After the connection is established the value of
:ts:cv:`proxy.config.http.transaction_no_activity_timeout_out` is used to established timeouts on the data over the connection.

::
.. code-block:: yaml

CONFIG proxy.config.http.connect_attempts_timeout INT 30
ts:
http:
connect_attempts_timeout: 30

Polling Timeout
~~~~~~~~~~~~~~~

If you are experiencing unusually or unacceptably high CPU utilization during
idle workloads, you may consider adjusting the polling timeout with
:ts:cv:`proxy.config.net.poll_timeout`::
:ts:cv:`proxy.config.net.poll_timeout`.

.. code-block:: yaml

CONFIG proxy.config.net.poll_timeout INT 60
ts:
net:
poll_timeout: 60

SOCKS Timeouts
~~~~~~~~~~~~~~
Expand All @@ -358,12 +378,15 @@ is the timeout for the actual connection attempt on a retry, not the delay
after which a retry will be performed (the delay is configured with
:ts:cv:`proxy.config.socks.server_retry_time`).

::
.. code-block:: yaml

ts:
socks:
server_connect_timeout: 10
server_retry_time: 300
server_retry_timeout: 300
socks_timeout: 100

CONFIG proxy.config.socks.socks_timeout INT 100
CONFIG proxy.config.socks.server_connect_timeout INT 10
CONFIG proxy.config.socks.server_retry_timeout INT 300
CONFIG proxy.config.socks.server_retry_time INT 300

SSL Timeouts
~~~~~~~~~~~~
Expand All @@ -385,12 +408,17 @@ the remote OCSP responders, in seconds, with
Lastly, you can control the number of seconds for which SSL sessions will be
cached in |TS| using :ts:cv:`proxy.config.ssl.session_cache.timeout`.

::
.. code-block:: yaml

ts:
ssl:
handshake_timeout_in: 30
ocsp:
cache_timeout: 3600
request_timeout: 10
session_cache:
timeout: 0

CONFIG proxy.config.ssl.handshake_timeout_in INT 30
CONFIG proxy.config.ssl.ocsp.cache_timeout INT 3600
CONFIG proxy.config.ssl.ocsp.request_timeout INT 10
CONFIG proxy.config.ssl.session_cache.timeout INT 0

Transaction Activity Timeouts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -427,12 +455,14 @@ and not transmitting data, for clients and origin servers respectively.
Unlike the active transaction timeouts, these two inactive transaction timeout
values prove somewhat more generally applicable.

::
.. code-block:: yaml

CONFIG proxy.config.http.transaction_active_timeout_in INT 900
CONFIG proxy.config.http.transaction_active_timeout_out INT 0
CONFIG proxy.config.http.transaction_no_activity_timeout_in INT 30
CONFIG proxy.config.http.transaction_no_activity_timeout_out INT 30
ts:
http:
transaction_active_timeout_in: 900
transaction_active_timeout_out: 0
transaction_no_activity_timeout_in: 30
transaction_no_activity_timeout_out: 30

WebSocket Timeouts
~~~~~~~~~~~~~~~~~~
Expand All @@ -443,10 +473,13 @@ length of time a stalled WebSocket connection will remain before |TS| closes
it. :ts:cv:`proxy.config.websocket.active_timeout` sets the maximum duration
for all WebSocket connections, regardless of their level of activity.

::
.. code-block:: yaml

ts:
websocket:
active_timeout: 3600
no_activity_timeout: 600

CONFIG proxy.config.websocket.no_activity_timeout INT 600
CONFIG proxy.config.websocket.active_timeout INT 3600

Memory Optimization
-------------------
Expand Down Expand Up @@ -481,11 +514,15 @@ client request resulting in an origin request.
This behavior is controlled by both enabling the feature via
:ts:cv:`proxy.config.http.negative_caching_enabled` and setting the cache time
(in seconds) with :ts:cv:`proxy.config.http.negative_caching_lifetime`. Configured
status code for negative caching can be set with :ts:cv:`proxy.config.http.negative_caching_list`. ::
status code for negative caching can be set with :ts:cv:`proxy.config.http.negative_caching_list`.

.. code-block:: yaml

CONFIG proxy.config.http.negative_caching_enabled INT 1
CONFIG proxy.config.http.negative_caching_lifetime INT 10
CONFIG proxy.config.http.negative_caching_list STRING 204 305 403 404 414 500 501 502 503 504
ts:
http:
negative_caching_enabled: 1
negative_caching_lifetime: 10
negative_caching_list: 204 305 403 404 414 500 501 502 503 504

SSL-Specific Options
~~~~~~~~~~~~~~~~~~~~
Expand Down
8 changes: 6 additions & 2 deletions doc/admin-guide/plugins/conf_remap.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ Instead of specifying the directives and their values in :file:`remap.config`
as you do with the in-line method, you place all the affected directives in a
separate text file. The location and name is entirely up to you, but we'll use
`/etc/trafficserver/cdn_conf_remap.config` here. The contents of this file
should mirror how configuration directives are written in :file:`records.yaml`::
should mirror how configuration directives are written in :file:`records.yaml`:

CONFIG proxy.config.url_remap.pristine_host_hdr INT 1
.. code-block:: yaml

ts:
url_remap:
pristine_host_hdr: 1

Your :file:`remap.config` will then contain remapping rules that point to this
external file::
Expand Down
Loading