You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Randeep <ra...@gmail.com> on 2016/02/16 19:59:21 UTC

Parent-child-child caching issue

Hi all,

I am using parent-child heirarchy caching for hls and dash.

main parent(172.16.0.40) middle-child(172.16.6.5) end-child(172.16.48.20)

the device which is connected to the end-child is accessing the url
http://host1.domain.com/hls/channel/index.m3u8

in the endchild:
proxy.config.http.cache.http INT 1
remap_required INT 0
reverse_proxy.enabled INT 0

but written the following rule in remap.config
map http://host1.domain.com http://host1.domain.com
@plugin=/opt/ats/libexec/trafficserver/regex_remap.so
@pparam=/tmp/regex1.config @pparam=no-query-string
[root@lmo-aphy00038 trafficserver]# cat /tmp/regex1.config
^/(.*)$ http://host1.domain.com/$1
parent.config
dest_domain=host1.domain.com method=get parent="172.16.0.40:80"
 go_direct=false

in mid_child:
proxy.config.http.cache.http INT 1
remap_required INT 0
reverse_proxy.enabled INT 0
remap rule
map http://host1.domain.com http://host1.domain.com
@plugin=/opt/ats/libexec/trafficserver/regex_remap.so
@pparam=/tmp/regex1.config @pparam=no-query-string
parent.config
dest_domain=host1.domain.com method=get parent="172.16.0.40:80"
 go_direct=false

in main parent
remap file enabled
reverese proxy enabled
caching enabled
map http://host1.domain.com/ http://172.16.200.102/
 @plugin=/opt/ats/libexec/trafficserver/regex_remap.so @pparam=
@pparam=no-query-string
[root@bangalore trafficserver]# cat /tmp/jitp1.config
^/(.*)$ http://172.16.200.101/$1

101 server has following http headers:
Access-Control-Allow-Origin: *
Cache-Control: max-age=10

the issue is none of the servers are caching the content.
is the implementation logic is right?


-- 
Randeep
Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]
http://twitter.com/Randeeppr
http://in.linkedin.com/in/randeeppr


[image: --]
Randeep Raman
[image: http://]about.me/Randeeppr
<http://about.me/Randeeppr>

Re: Parent-child-child caching issue

Posted by James Peach <ja...@me.com>.
> On Feb 16, 2016, at 10:59 AM, Randeep <ra...@gmail.com> wrote:
> 
> Hi all,
> 
> I am using parent-child heirarchy caching for hls and dash.
> 
> main parent(172.16.0.40) middle-child(172.16.6.5) end-child(172.16.48.20)

I think you need to break the problem down. Start from the parent that is closest to the origin and make sure that is caching the way that you want, then work up through the cache hierarchy. At each step, I'd use server los and the xdebug plugin to make sure that the cache behaviour is what you want.

> the device which is connected to the end-child is accessing the url
> http://host1.domain.com/hls/channel/index.m3u8
> 
> in the endchild:
> proxy.config.http.cache.http INT 1
> remap_required INT 0
> reverse_proxy.enabled INT 0
> 
> but written the following rule in remap.config
> map http://host1.domain.com http://host1.domain.com
> @plugin=/opt/ats/libexec/trafficserver/regex_remap.so
> @pparam=/tmp/regex1.config @pparam=no-query-string
> [root@lmo-aphy00038 trafficserver]# cat /tmp/regex1.config
> ^/(.*)$ http://host1.domain.com/$1
> parent.config
> dest_domain=host1.domain.com method=get parent="172.16.0.40:80"
> go_direct=false
> 
> in mid_child:
> proxy.config.http.cache.http INT 1
> remap_required INT 0
> reverse_proxy.enabled INT 0
> remap rule
> map http://host1.domain.com http://host1.domain.com
> @plugin=/opt/ats/libexec/trafficserver/regex_remap.so
> @pparam=/tmp/regex1.config @pparam=no-query-string
> parent.config
> dest_domain=host1.domain.com method=get parent="172.16.0.40:80"
> go_direct=false
> 
> in main parent
> remap file enabled
> reverese proxy enabled
> caching enabled
> map http://host1.domain.com/ http://172.16.200.102/
> @plugin=/opt/ats/libexec/trafficserver/regex_remap.so @pparam=
> @pparam=no-query-string
> [root@bangalore trafficserver]# cat /tmp/jitp1.config
> ^/(.*)$ http://172.16.200.101/$1
> 
> 101 server has following http headers:
> Access-Control-Allow-Origin: *
> Cache-Control: max-age=10
> 
> the issue is none of the servers are caching the content.
> is the implementation logic is right?
> 
> 
> -- 
> Randeep
> Mob: +919447831699[kerala]
> Mob: +919880050349[B'lore]
> http://twitter.com/Randeeppr
> http://in.linkedin.com/in/randeeppr
> 
> 
> [image: --]
> Randeep Raman
> [image: http://]about.me/Randeeppr
> <http://about.me/Randeeppr>


Re: Parent-child-child caching issue

Posted by James Peach <ja...@me.com>.
> On Feb 16, 2016, at 10:59 AM, Randeep <ra...@gmail.com> wrote:
> 
> Hi all,
> 
> I am using parent-child heirarchy caching for hls and dash.
> 
> main parent(172.16.0.40) middle-child(172.16.6.5) end-child(172.16.48.20)

I think you need to break the problem down. Start from the parent that is closest to the origin and make sure that is caching the way that you want, then work up through the cache hierarchy. At each step, I'd use server los and the xdebug plugin to make sure that the cache behaviour is what you want.

> the device which is connected to the end-child is accessing the url
> http://host1.domain.com/hls/channel/index.m3u8
> 
> in the endchild:
> proxy.config.http.cache.http INT 1
> remap_required INT 0
> reverse_proxy.enabled INT 0
> 
> but written the following rule in remap.config
> map http://host1.domain.com http://host1.domain.com
> @plugin=/opt/ats/libexec/trafficserver/regex_remap.so
> @pparam=/tmp/regex1.config @pparam=no-query-string
> [root@lmo-aphy00038 trafficserver]# cat /tmp/regex1.config
> ^/(.*)$ http://host1.domain.com/$1
> parent.config
> dest_domain=host1.domain.com method=get parent="172.16.0.40:80"
> go_direct=false
> 
> in mid_child:
> proxy.config.http.cache.http INT 1
> remap_required INT 0
> reverse_proxy.enabled INT 0
> remap rule
> map http://host1.domain.com http://host1.domain.com
> @plugin=/opt/ats/libexec/trafficserver/regex_remap.so
> @pparam=/tmp/regex1.config @pparam=no-query-string
> parent.config
> dest_domain=host1.domain.com method=get parent="172.16.0.40:80"
> go_direct=false
> 
> in main parent
> remap file enabled
> reverese proxy enabled
> caching enabled
> map http://host1.domain.com/ http://172.16.200.102/
> @plugin=/opt/ats/libexec/trafficserver/regex_remap.so @pparam=
> @pparam=no-query-string
> [root@bangalore trafficserver]# cat /tmp/jitp1.config
> ^/(.*)$ http://172.16.200.101/$1
> 
> 101 server has following http headers:
> Access-Control-Allow-Origin: *
> Cache-Control: max-age=10
> 
> the issue is none of the servers are caching the content.
> is the implementation logic is right?
> 
> 
> -- 
> Randeep
> Mob: +919447831699[kerala]
> Mob: +919880050349[B'lore]
> http://twitter.com/Randeeppr
> http://in.linkedin.com/in/randeeppr
> 
> 
> [image: --]
> Randeep Raman
> [image: http://]about.me/Randeeppr
> <http://about.me/Randeeppr>