Re: [squid-users] Re: ICP and HTCP and StoreID

From: Niki Gorchilov <niki_at_gorchilov.com>
Date: Tue, 11 Feb 2014 19:51:30 +0200

Rising this issue from the dead :-)

On Thu, Jan 16, 2014 at 8:21 AM, Alex Rousskov
<rousskov_at_measurement-factory.com> wrote:
> On 01/15/2014 03:31 PM, Niki Gorchilov wrote:
>> Actually, it is working. [...] inter cache communication is working only with
>> altered URLs but this still does the job:
>> - If UDP is MISS the originating peer makes a TCP connection to
>> destination server and caches the result
>> - if UDP is HIT, the call is forwarded via sibling with modified URL,
>> but the sibling handles the request without problems
>>
>> UDP HIT request example:
>> peer B: UDP_HIT/000 0 HTCP_TST
>> http://c.youtube.com.squid.internal/videoplayback/09ebf166f4892e4f.140.712704-950271
>> - HIER_NONE/- -
>> peer B: TCP_HIT/200 237948 GET
>> http://c.youtube.com.squid.internal/videoplayback/09ebf166f4892e4f.140.712704-950271
>> - HIER_NONE/- application/octet-stream
>> peer A: TCP_MISS/200 237948 GET
>> http://r2---sn-bavc5aoxu-nv4e.googlevideo.com/videoplayback? -
>> SIBLING_HIT/peerb application/octet-stream
>>
>> UDP MISS request example:
>> peer B: UDP_MISS/000 0 HTCP_TST
>> http://c.youtube.com.squid.internal/videoplayback/09ebf166f4892e4f.140.2138112-2375679
>> - HIER_NONE/- -
>> peer A: TCP_MISS/200 237938 GET
>> http://r2---sn-bavc5aoxu-nv4e.googlevideo.com/videoplayback? -
>> HIER_DIRECT/r2---sn-bavc5aoxu-nv4e.googlevideo.com
>> application/octet-stream
>>
>> Case closed!
>
> Store ID is not a URL (even if it is often convenient to think that
> way). If Squid sends requests with StoreIDs, Squid is broken (even if it
> happens to usually work in your particular case). Consider the situation
> where the peer returned UDP_HIT but then purged the cached entry. What
> will it do with the c.youtube.com.squid.internal request?

Yes, you are absolutely right. Everything "works" until the peer
decides to refresh the entry during the TCP session. Then it tries to
connect to the non-existent *.squid.internal host, which obviously
fails.

> Somebody who cares about this _and_ can reproduce it, should file a bug
> report, but please double check that the requests are indeed using Store
> IDs using cache.log debugging or a packet trace. Do not just assume that
> Squid will never log a Store ID instead of a URL.

Bug is definitely there. Confirmed by sniffing the inter-peer
communication. I may try to fix it but give me some high-level advice
in which classes/files to look for. I get lost at
http://www.squid-cache.org/Doc/code/annotated.html :)

> Thank you,
>
> Alex.

Best,
Niki
Received on Tue Feb 11 2014 - 17:52:22 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 12 2014 - 12:00:04 MST