-
Notifications
You must be signed in to change notification settings - Fork 848
cache_range_requests plugin optional support for special IMS header #6217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
18036cc to
e92db28
Compare
02daa0a to
9a81d85
Compare
|
[approve ci] |
jrushford
left a comment
There was a problem hiding this 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.
9a81d85 to
6269ac4
Compare
|
Added a cache_range_requests admin guide. |
|
@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:
|
58a1f45 to
422b42b
Compare
422b42b to
96bf308
Compare
jrushford
left a comment
There was a problem hiding this 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
|
Cherry-picked to v9.0.x branch. |
…pache#6217) (cherry picked from commit fbe11ae)
…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)
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.