[
https://issues.apache.org/jira/browse/TS-4707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15504833#comment-15504833
]
Gancho Tenev commented on TS-4707:
----------------------------------
[~jrushford], [~pbchou], [~zwoop],
I am not sure if I studied this enough but here is an idea: it seems that we
could add a switch to {{cachekey}} plugin to make it use the "modify parent
selection URI" API call instead of "modify cache key URI" API if something
like: {{\@plugin=cachekey \@pparam=--parent_selection}} is used.
This way we may be able to use independently different {{cachekey}} plugin
instances per each remap rule (one for modifying the cache key URI and one for
modifying the parent selection URI) to be able to cover for more use-cases,
reuse the {{cachekey}} URI manipulation functionality and have consistent user
experience. If this makes sense/works we may end up renaming the plugin to
something more generic.
Currently {{cachekey}} plugin has the ability to do {{fname}} and {{maxdirs}}
features by using some of its regex related features (please see
{{--capture-path=/capture/replace/}} @ [cachekey
docs|https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/cachekey.en.html#path-section],
I can provide examples if requested)
I think {{fname}} would not make sense for manipulating the cache key URI and
if we insist on non-regex ways to achieve {{fname}} and {{maxdirs}} we could
add it as features available only if {{--parent_selection}} is used, or
something in this sense.
If this sounds sensible/feasible I can work on the {{cachekey}} plugin change.
> Parent Consistent Hash Selection - add fname and maxdirs options.
> -----------------------------------------------------------------
>
> Key: TS-4707
> URL: https://issues.apache.org/jira/browse/TS-4707
> Project: Traffic Server
> Issue Type: Improvement
> Components: Parent Proxy
> Reporter: Peter Chou
> Assignee: Peter Chou
> Fix For: 7.1.0
>
> Time Spent: 11.5h
> Remaining Estimate: 0h
>
> This enhancement adds two options, "fname" and "maxdirs", which can be used
> to exclude the file-name and some of the directories in the path. The
> remaining portions of the path are then used as part of the hash computation
> for selecting among multiple parent caches.
> For our usage, it was desirable from an operational perspective to direct all
> components of particular sub-tree to a single parent cache (to simplify
> trouble-shooting, pre-loading, etc.). This can be achieved by excluding the
> query-string, file-name, and right-most portions of the path from the hash
> computation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)