Skip to content

Commit 7e6c192

Browse files
committed
Merge branch 'master' into quic-latest
* master: Introduce NetEvent to split UnixNetVConnection and NetHandler Reduce process duration of test_Http2FrequencyCounter Make sure shutdown_cont_event isn't holding any garbage references. Add in_destroy to Http2ConnectionState to prevent double delete (similar to Http2ClientSession) Fixes a corner case where the NextHop consistent hash ring may not be searched in it's entirety for an available host due to a premature wrapped ring indication. Adjust debug tag for ssl_sni_whitelist plugin to match plugin Add invalid config warning when cache open write fail and read retry are inconsistent Add links to RWW sections Fix rst errors for collapsed forwarding plugin Set wrap after checking all the parents Perf: replace dynamic_cast with static_cast in this_thread() Fixes a few Sphinx build warnings (#6290) Moving / adding the Roadmap to the release notes (#6257) These features are in 9.0.x release notes (#6286) Removes the remaining references to TSQA LGTM: Fix unused imports Assure no SM survives plugin factory deactivation. Remove remnants of obsolete remap thread. Update the admin-guide hierachical caching and remap.config documentation to include the NextHop strategies feature. For combo_handler plugin, add an optional whitelist of allowed values for Content-Type. Copy the Client SNI Server Name out of the openssl SSL object and ensure it is null-terminated. For per-transaction config override, crossing the const-correctness event horizon. Remove -j from lgtm build (#6274) LGTM: Add header guards LGTM: Fix wrong type of arguments to formatting function Change HTTP/2 error rate log to warning LGTM: fixes a shadowed variable in ParentSelection::PreprocessParents(). LGTM: fix a comparison that is always false. Fixes various crashers loading/reloading parent.config TCL: cleanup in HostLookup.cc, make sure keys are stable. (#6263) Fix TS_USE_DIAGS usage for --disable-diags option Initial revision of .lgtm.yml config file (#6258) auto delete rolled log file fixes remap_stats: restore handling of remap/hostname to remove memory leak Avoid unnecesarry copy on POST request over HTTP/2 Add some stats collections to cache_promote. Some tweaks to reloading-plugins.en.rst (#6251) Fix sni.yaml fqdn to match complete name string Adding verify plugin TS maintenance commands Removing traffic_cop reference in Admin Guide introduction.
2 parents b15cf09 + f630275 commit 7e6c192

File tree

135 files changed

+3738
-1081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+3738
-1081
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
*.o
2+
*.c_o
3+
*.cc_o
24
*.a
35
*.so
46
*.pyc

.lgtm.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
18+
extraction:
19+
cpp:
20+
prepare:
21+
packages:
22+
- "libcjose-dev"
23+
- "libcjose0"
24+
- "libjansson-dev"
25+
- "libluajit-5.1-dev"
26+
- "libpcre3-dev"
27+
- "zlib1g-dev"
28+
after_prepare: "autoreconf -fiv"
29+
configure:
30+
command: "./configure --enable-experimental-plugins"
31+
index:
32+
build_command: "make"

contrib/python/compare_RecordsConfigcc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#
1919
import re
2020
import sys
21-
import string
2221

2322
try:
2423
src_dir = sys.argv[1]

doc/admin-guide/configuration/hierarchical-caching.en.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ host name. This is true regardless of pristine host headers
106106
(:ts:cv:`proxy.config.url_remap.pristine_host_hdr`) being enabled or not. The parent node
107107
will receive the translated request (and thus needs to be configured to accept it).
108108

109+
:file:`remap.config` now also allows an alternative configuration that supports all the
110+
**Parent Selection** policies and failover mentioned here using a new :file:`remap.config` tag,
111+
**@strategy**. This eliminates the need for a second lookup against the remapped host name
112+
required when using :file:`parent.config`. See using NextHop strategies with :file:`remap.config`,
113+
:doc:`../../admin-guide/files/strategies.yaml.en`
109114

110115
Example
111116
~~~~~~~
@@ -165,7 +170,11 @@ the configuration adjustments detailed below.
165170
cache.
166171

167172
#. Edit :file:`parent.config` to set parent proxy rules which will specify the
168-
parent cache to which you want missed requests to be forwarded.
173+
parent cache to which you want missed requests to be forwarded. Or as an
174+
alternative to :file:`parent.config`, edit :file:`strategies.yaml` to
175+
specify next hop parent proxy rules and hosts. Then in :file:`remap.config`
176+
use the **@strategy** tag to select the next hop parent proxy rules. See
177+
:doc:`../../admin-guide/files/strategies.yaml.en`
169178

170179
The following example configures Traffic Server to route all requests
171180
containing the regular expression ``politics`` and the path

doc/admin-guide/files/records.config.en.rst

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,11 +2329,11 @@ Dynamic Content & Content Negotiation
23292329
origin server.
23302330
``4`` Return a ``502`` error on either a cache miss or on a revalidation.
23312331
``5`` Retry Cache Read on a Cache Write Lock failure. This option together
2332-
with `proxy.config.cache.enable_read_while_writer` configuration
2332+
with :ts:cv:`proxy.config.cache.enable_read_while_writer` configuration
23332333
allows to collapse concurrent requests without a need for any plugin.
2334-
Make sure to configure Read While Writer feature correctly following
2335-
the docs in Cache Basics section. Note that this option may result in
2336-
CACHE_LOOKUP_COMPLETE HOOK being called back more than once.
2334+
Make sure to configure the :ref:`admin-config-read-while-writer` feature
2335+
correctly. Note that this option may result in CACHE_LOOKUP_COMPLETE HOOK
2336+
being called back more than once.
23372337
===== ======================================================================
23382338

23392339
Customizable User Response Pages
@@ -3970,15 +3970,6 @@ Plug-in Configuration
39703970
39713971
Specifies the location of |TS| plugins.
39723972

3973-
.. ts:cv:: CONFIG proxy.config.remap.num_remap_threads INT 0
3974-
3975-
When this variable is set to ``0``, plugin remap callbacks are
3976-
executed in line on network threads. If remap processing takes
3977-
significant time, this can be cause additional request latency.
3978-
Setting this variable to causes remap processing to take place
3979-
on a dedicated thread pool, freeing the network threads to service
3980-
additional requests.
3981-
39823973
SOCKS Processor
39833974
===============
39843975

doc/admin-guide/files/remap.config.en.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,13 @@ mapping rules. (It is activated before any mappings and is never
480480
deactivated.) The filter `local_only` will only be applied to the
481481
second mapping.
482482

483+
NextHop Selection Strategies
484+
============================
485+
486+
You may configure Nexthop or Parent hierarchical caching rules by remap using the
487+
**@strategy** tag. See :doc:`../configuration/hierarchical-caching.en` and :doc:`strategies.yaml.en`
488+
for configuration details and examples.
489+
483490
Including Additional Remap Files
484491
================================
485492

doc/admin-guide/introduction.en.rst

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ bindings in memory, DNS traffic is reduced.
165165
|TS| Processes
166166
--------------
167167

168-
|TS| contains three processes that work together to serve
168+
|TS| contains two processes that work together to serve
169169
requests and manage, control, and monitor the health of the system.
170170

171-
- The :program:`traffic_server` process is the transaction processing engine
171+
#. The :program:`traffic_server` process is the transaction processing engine
172172
of |TS|. It is responsible for accepting connections,
173173
processing protocol requests, and serving documents from the cache or
174174
origin server.
175175

176-
- The :program:`traffic_manager` process is the command and control facility
176+
#. The :program:`traffic_manager` process is the command and control facility
177177
of the |TS|, responsible for launching, monitoring, and
178178
reconfiguring the :program:`traffic_server` process. The :program:`traffic_manager`
179179
process is also responsible for the proxy autoconfiguration port, the
@@ -187,14 +187,6 @@ requests and manage, control, and monitor the health of the system.
187187
first-served order. This connection queueing shields users from any
188188
server restart downtime.
189189

190-
The figure below illustrates the |TS| processes.
191-
192-
.. figure:: ../static/images/admin/process.jpg
193-
:align: center
194-
:alt: Illustration of the |TS| Processes
195-
196-
Illustration of the |TS| Processes
197-
198190
Administration Tools
199191
--------------------
200192

doc/admin-guide/plugins/cache_promote.en.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ If :option:`--policy` is set to ``lru`` the following options are also available
4949

5050
The size (number of entries) of the LRU.
5151

52+
.. option:: --stats-enable-with-id
53+
54+
Enables collecting statistics. The option requires an argument, the
55+
remap-identifier. The remap-identifier is a string that is concatenated
56+
to the stat name. The following stats are collected.
57+
58+
* **plugin.cache_promote.${remap-identifier}.cache_hits** - Cache hit total, available for all policies.
59+
* **plugin.cache_promote.${remap-identifier}.freelist_size** - Size of the freelist when using the LRU policy.
60+
* **plugin.cache_promote.${remap-identifier}.lru_size** - Size of the LRU when using the LRU policy.
61+
* **plugin.cache_promote.${remap-identifier}.lru_hit** - LRU hit count when using the LRU policy.
62+
* **plugin.cache_promote.${remap-identifier}.lru_miss** - LRU miss count when using the LRU policy.
63+
* **plugin.cache_promote.${remap-identifier}.lru_vacated** - count of LRU entries removed to make room for a new request.
64+
* **plugin.cache_promote.${remap-identifier}.promoted** - count requests promoted, available in all policies.
65+
* **plugin.cache_promote.${remap-identifier}.total_requests** - count of all requests.
66+
5267
These two options combined with your usage patterns will control how likely a
5368
URL is to become promoted to enter the cache.
5469

doc/admin-guide/plugins/collapsed_forwarding.en.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ on the error by using an internal redirect follow back to itself, essentially
7979
blocking the request until a response arrives, at which point, relies on
8080
read-while-writer feature to start downloading the object to all waiting
8181
clients. The following config parameters are assumed to be set for this
82-
plugin to work::
82+
plugin to work:
8383

84-
:ts:cv:`proxy.config.http.cache.open_write_fail_action` 1
85-
:ts:cv:`proxy.config.cache.enable_read_while_writer` 1
86-
:ts:cv:`proxy.config.http.number_of_redirections` 10
87-
:ts:cv:`proxy.config.http.redirect_use_orig_cache_key` 1
88-
:ts:cv:`proxy.config.http.background_fill_active_timeout` 0
89-
:ts:cv:`proxy.config.http.background_fill_completed_threshold` 0
84+
- :ts:cv:`proxy.config.http.cache.open_write_fail_action` ``1``
85+
- :ts:cv:`proxy.config.cache.enable_read_while_writer` ``1``
86+
- :ts:cv:`proxy.config.http.number_of_redirections` ``10``
87+
- :ts:cv:`proxy.config.http.redirect_use_orig_cache_key` ``1``
88+
- :ts:cv:`proxy.config.http.background_fill_active_timeout` ``0``
89+
- :ts:cv:`proxy.config.http.background_fill_completed_threshold` ``0``
9090

9191
Additionally, given that collapsed forwarding works based on cache write
9292
lock failure detection, the plugin requires cache to be enabled and ready.
@@ -119,7 +119,7 @@ For a large scale Video Streaming scenario, there’s a combination of a
119119
large number of revalidations (e.g. media playlists) and cache misses
120120
(e.g. media segments) that occur for the same file. Traffic Server’s
121121
RWW works great in collapsing the concurrent requests in such a scenario,
122-
however, as described in ``_admin-configuration-reducing-origin-requests``,
122+
however, as described in :ref:`admin-configuration-reducing-origin-requests`,
123123
Traffic Server’s implementation of RWW has a significant limitation, which
124124
restricts its ability to invoke RWW only when the response headers are
125125
already received. This means that any number of concurrent requests for
@@ -185,6 +185,4 @@ retries, allowing to be able to initiate RWW, whenever the response headers
185185
are received for the request that was allowed to go to the Origin.
186186

187187

188-
More details are available at
189-
190-
https://docs.trafficserver.apache.org/en/6.0.x/admin/http-proxy-caching.en.html#reducing-origin-server-requests-avoiding-the-thundering-herd
188+
More details are available at :ref:`admin-configuration-reducing-origin-requests`

doc/admin-guide/plugins/combo_handler.en.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ The arguments in the :file:`plugin.config` line in order represent
4747
2. The name of the key used for signature verification (disabled by
4848
default)
4949

50+
3. A colon separated list of headers which, if present on at least one response, will be
51+
added to the combo response.
52+
53+
4. The path of a config file with allowed content types of objects to be combined, one per
54+
line, without parameters. (Blank lines and comments starting with "#" are ignored.)
55+
Parameters in the Content-Type field value will be ignored when
56+
checking if they appear in the allowed types. If the path does not start with "/", the
57+
config file must be located in the ATS config directory. By default, all content types
58+
are allowed, but if this file is specified, it must contain at least one content type.
59+
5060
A "-" can be supplied as a value for any of these arguments to request
5161
default value be applied.
5262

0 commit comments

Comments
 (0)