You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Nick Dunkin <Ni...@vecima.com> on 2021/01/11 18:22:33 UTC

Question about parent.config

Hi all,

I wish to use parent.config to control parent selection based on path elements in the client URL.  I know this is possible with the url_regex primary qualifier, however my question is as follows:

The URL path element in question will be in the client request URL but will be dropped (by a custom plugin) from the URL before the request is made to the parent.  Does anybody know if the url_regex qualifier applies to the full original client URL,  or to the URL that is imminently about to be pulled from the parent.  If it’s the latter and there’s anything I can do in the custom plug-in to make this work more as I would like it, then please let me know.

For example:

The client facing URL may be : http://my-ats.com/some-element/media/movie.m3u8

The URL actually pulled from the parent : http://your-ats.com/media/movie.m3u8

The url_regex I want to use : /some-element/

So, in summary, I wish to use a token in the client URL that would indicate which parent to use, but that token will not be in the URL ultimately pulled from the parent.

Thank you,

Nick

Nick Dunkin
Director, Software Engineering
Manager – Architecture and New Product Introduction
o:  +1 678.258.4071
e: nick.dunkin@vecima.com<ma...@vecima.com>

[cidimage001.png@01D6CC8C.6FC5A580]

Re: Question about parent.config

Posted by Miles Libbey <ml...@apache.org>.
Indeed -- we are on 8.1, and use the cachekey plugin to affect the url
used to select parents (we ~exclusively use the consistent hash
policy). I beleive the cachekey plugin allows for both specifically
setting cachekey and/or setting the parent selection url. Presumably
the consistent hash url would be used for the url_regex selector.

miles

On Mon, Jan 11, 2021 at 10:26 AM Leif Hedstrom <zw...@apache.org> wrote:
>
>
>
> On Jan 11, 2021, at 11:22 AM, Nick Dunkin <Ni...@vecima.com> wrote:
>
> Hi all,
>
> I wish to use parent.config to control parent selection based on path elements in the client URL.  I know this is possible with the url_regex primary qualifier, however my question is as follows:
>
> The URL path element in question will be in the client request URL but will be dropped (by a custom plugin) from the URL before the request is made to the parent.  Does anybody know if the url_regex qualifier applies to the full original client URL,  or to the URL that is imminently about to be pulled from the parent.  If it’s the latter and there’s anything I can do in the custom plug-in to make this work more as I would like it, then please let me know.
>
>
>
> Should be on the URL as it goes to the origin. But, I think (as of ATS 9.0.x?) that you can use the cache_key plugin to change the effective URL that is being used for parent selection? I haven’t tested / played with that though, John and Vijay might know?
>
> — Leif
>

Re: Question about parent.config

Posted by John Rushford <jj...@gmail.com>.
Leif is correct, you should look at using the cache_key plugin to generate
a string that is used to lookup parents from it's hash.  With that said,
the string is hashed as is the path string and the hash is used to lookup
parents.  If you're trying to select specific parents based upon some path
element that is not supported.

On Mon, Jan 11, 2021 at 11:26 AM Leif Hedstrom <zw...@apache.org> wrote:

>
>
> On Jan 11, 2021, at 11:22 AM, Nick Dunkin <Ni...@vecima.com> wrote:
>
> Hi all,
>
> I wish to use parent.config to control parent selection based on path
> elements in the client URL.  I know this is possible with the *url_regex* primary
> qualifier, however my question is as follows:
>
> The URL path element in question will be in the client request URL *but* will
> be dropped (by a custom plugin) from the URL before the request is made to
> the parent.  Does anybody know if the *url_regex *qualifier applies to
> the full original client URL,  or to the URL that is imminently about to be
> pulled from the parent.  If it’s the latter and there’s anything I can do
> in the custom plug-in to make this work more as I would like it, then
> please let me know.
>
>
>
> Should be on the URL as it goes to the origin. But, I think (as of ATS
> 9.0.x?) that you can use the cache_key plugin to change the effective URL
> that is being used for parent selection? I haven’t tested / played with
> that though, John and Vijay might know?
>
> — Leif
>
>

-- 
John Rushford
jjrushford@gmail.com

Re: Question about parent.config

Posted by Leif Hedstrom <zw...@apache.org>.

> On Jan 11, 2021, at 11:22 AM, Nick Dunkin <Nick.Dunkin@vecima.com <ma...@vecima.com>> wrote:
> 
> Hi all,
>  
> I wish to use parent.config to control parent selection based on path elements in the client URL.  I know this is possible with the url_regex primary qualifier, however my question is as follows:
>  
> The URL path element in question will be in the client request URL but will be dropped (by a custom plugin) from the URL before the request is made to the parent.  Does anybody know if the url_regex qualifier applies to the full original client URL,  or to the URL that is imminently about to be pulled from the parent.  If it’s the latter and there’s anything I can do in the custom plug-in to make this work more as I would like it, then please let me know.


Should be on the URL as it goes to the origin. But, I think (as of ATS 9.0.x?) that you can use the cache_key plugin to change the effective URL that is being used for parent selection? I haven’t tested / played with that though, John and Vijay might know?

— Leif