Skip to content

Conversation

@traeak
Copy link
Contributor

@traeak traeak commented Nov 20, 2019

To support slice plugin self healing a regex_revalidate type feature can be enabled for cache_range_requests (param -c or --consider-ims):

X-CRR-IMS: (date) (ie: Tue, 19 Nov 2019 13:26:45 GMT)

Use case: During slice stitching if 2 adjacent range requests disagree for etag/last modifed, the "older" of the 2 block ranges will be re-requested with this X-CRR-IMS: (newer block range date) which can propagate up through layers of a CDN to an origin if necessary (assuming they all use the cache_range_request plugin with the --consider-ims param).

When enabled and using with the slice plugin, for security purposes it is advisable to add a header_rewrite rule to strip the X-CRR-IMS header at the edge if the incoming port (php) is NOT 0 (the internal ATS loopback port).

Converted the plugin configuration to use getopt_long() and deprecated ps_mode:cache_key_url in favor of -p or --ps-cachekey Modified base autest for both new and deprecated option check.

Also included: TSMBuffer/TSMLoc variable name changes, switching a txndata::char* to std::string (no extra malloc/freees), switching static const char* to constexpr std::string_view, moving functions into a private namespace.

Extra testing: valgrind with small canned set of requests, automated range requester which dual issues through ATS and origin.

@traeak traeak force-pushed the plugin_crr_ims branch 2 times, most recently from 18036cc to e92db28 Compare November 20, 2019 20:24
@randall randall added this to the 10.0.0 milestone Nov 20, 2019
@jrushford jrushford self-requested a review November 22, 2019 17:09
@traeak traeak force-pushed the plugin_crr_ims branch 3 times, most recently from 02daa0a to 9a81d85 Compare November 22, 2019 17:49
@traeak traeak marked this pull request as ready for review November 22, 2019 19:01
@jrushford
Copy link
Contributor

[approve ci]

Copy link
Contributor

@jrushford jrushford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might consider adding documentation for cache_range_requests to the admin-guide.

@traeak
Copy link
Contributor Author

traeak commented Nov 25, 2019

Added a cache_range_requests admin guide.

@jrushford
Copy link
Contributor

@traeak Thanks for adding the cache_range_requests to the admin-guide however, a link to the doc is needed in doc/admin-guide/plugins/index.en.rst so that the doc can be found. Also 'make html' gives this error:

/trafficserver/doc/admin-guide/plugins/cache_range_requests.en.rst: WARNING: document isn't included in any toctree

@traeak traeak force-pushed the plugin_crr_ims branch 3 times, most recently from 58a1f45 to 422b42b Compare December 4, 2019 13:37
Copy link
Contributor

@jrushford jrushford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @traeak

@jrushford jrushford merged commit 964336f into apache:master Dec 4, 2019
@zwoop
Copy link
Contributor

zwoop commented Mar 9, 2020

Cherry-picked to v9.0.x branch.

@zwoop zwoop modified the milestones: 10.0.0, 9.0.0 Mar 9, 2020
traeak added a commit to traeak/trafficserver that referenced this pull request Apr 23, 2021
ezelkow1 pushed a commit that referenced this pull request Apr 27, 2021
…lt. (#7740)

* slice port from master as of c8c9540

better handling of TSVIO calls and TSVConnAbort (#6239)
Slice plugin: recover out of sync slices, better handling of non 206s (#6691)
slice: clean up of created 502 response header (#6919)
default to throttling and subsequently simplify the transfer code (#7257)

(cherry picked from commit a622cbe)

slice/handleFirstServerHeader: return sooner on requested range errors (#7486)

(cherry picked from commit dfd4c7a)

* cache_range_requests plugin optional support for special IMS header (#6217)

(cherry picked from commit fbe11ae)
@traeak traeak deleted the plugin_crr_ims branch January 13, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants