Thank you for your answer. but the problem is

the first request from jwplayer get cache hit but the seek request for the 
movie doesn't get cache hit.

and I made trafficserver logs all detail. The first request from jwplayer 
follows SelectFromAlternates after cache lookup.

[Aug 31 17:44:09.659] Server {47773742200576} DEBUG: (http_seq) 
[HttpSM::do_cache_lookup_and_read] [6] Issuing cache lookup for URL 
http://test.com/fan.mp4?start=   
-------------------------------------------------------------------------> 
important!!!
[Aug 31 17:44:09.659] Server {47773742200576} DEBUG: (cache_hosting) Generic 
volume: ff98b8d for host: test.com
[Aug 31 17:44:09.659] Server {47773742200576} DEBUG: (cache_new) new 0x11fa3c0
[Aug 31 17:44:09.682] Server {47773742200576} DEBUG: (http_match) 
[SelectFromAlternates] # alternates = 1
[Aug 31 17:44:09.682] Server {47773742200576} DEBUG: (http_seq) 
[SelectFromAlternates] 1 alternates for this cached doc
[alts] There are 1 alternates for this request header.
[Aug 31 17:44:09.682] Server {47773742200576} DEBUG: (http_alternate) Exact 
match for ACCEPT CHARSET
[Aug 31 17:44:09.682] Server {47773742200576} DEBUG: (http_alternate) Exact 
match for ACCEPT ENCODING
[Aug 31 17:44:09.682] Server {47773742200576} DEBUG: (http_alternate) Exact 
match for ACCEPT LANGUAGE
[Aug 31 17:44:09.682] Server {47773742200576} DEBUG: (http_match)     
CalcQualityOfMatch: Accept match = 1



but the seek request while I'm watching movie doesn't follow same routine 
nevertheless it shows same cache lookup.

[Aug 31 17:44:12.249] Server {47773747463936} DEBUG: (http_seq) 
[HttpSM::do_cache_lookup_and_read] [7] Issuing cache lookup for URL 
http://test.com/fan.mp4?start=  
-----------------------------------------------------------------------> same 
cache lookup!!!!
[Aug 31 17:44:12.249] Server {47773747463936} DEBUG: (cache_hosting) Generic 
volume: ff98b8d for host: test.com
[Aug 31 17:44:12.249] Server {47773747463936} DEBUG: (cache_new) new 0x11faf30
[Aug 31 17:44:12.249] Server {47773747463936} DEBUG: (http_cache) [7] 
[&HttpCacheSM::state_cache_open_read, CACHE_EVENT_OPEN_READ_FAILED]
[Aug 31 17:44:12.249] Server {47773747463936} DEBUG: (http) [7] 
[HttpSM::main_handler, CACHE_EVENT_OPEN_READ_FAILED]
[Aug 31 17:44:12.249] Server {47773747463936} DEBUG: (http) [7] 
[&HttpSM::state_cache_open_read, CACHE_EVENT_OPEN_READ_FAILED]


I don't understand why trafficserver handle it in different way with same cache 
lookup url.

Thank you.

-----Original Message-----
From: Mark Harrison [mailto:[email protected]] 
Sent: Friday, August 31, 2012 10:51 PM
To: [email protected]
Subject: Re: trafficserver(with cacheurl plugin) return cache miss on seek 
request from jwplayer.

Quick guess - jwplayer is sending headers telling traffic server not to serve 
cached content. Are there differences in what wget and jwplayer are sending? 
The quickest way to find this out is probably to run tcpdump. Something like: 
'tcpdump -A -n port 80' while you run jwplayer and wget should print out enough 
information to see (look for the GET /movie.mp4.... line).

On Fri, Aug 31, 2012 at 6:32 AM, 오재경 <[email protected]> wrote:
> Hi everyone.
>
> I've made a h264streaming plugin. The requests for movie includes query 
> string like "start=xxxx" added by jwplayer.
>
> As you know trafficserver caches all different url even if these urls 
> indicates same movie when cache_urls_that_look_dynamic is on.
>
> I use cacheurl plugin to make cache url set by file path without query 
> string. (cacheurl.config : http://domain/([^?]*) http://test.com/$1)
>
> With cacheurl plugin only one contents is cached even if query string is 
> different.
>
> At first it looked work when i tested by wget command. Of course i made sure 
> if only one content is cached even different query string.
>
> "wget http://domain/movie.mp4?start=0";                 --> hit !
> "wget http://domain/movie.mp4?start=10";                --> hit !
> "wget http://domain/movie.mp4?start=12&key=xxx";        --> hit!
>
>
> but with jwplayer it doesn't work.
>
> On first request it hits but when i seek movie it doesn't hit!!"
>
> The requests from jwplaye are same to wget test case. But trafficserver 
> returns cache miss and all seek requests forwarded to origin server.
>
> The request by wget is "http://domain/movie.mp4?start=123"; in traffic.out. 
> Also the request by jwplayer is "http://domain/movie.mp4?start=123"; in 
> traffic.out. same!!! but cache hit with wget, cache miss with jwplayer.
>
> Anyone guess what the problem is? How can I fix it?
>
> Thank you.
>
>



--
Mark Harrison
Lead Site Reliability Engineer
OmniTI

Reply via email to