[squid-users] Unable to get TCP_MEM_HIT (just TCP_HIT) with rock storage

duanyao duanyao at ustc.edu
Thu Oct 19 03:37:19 UTC 2017


在 2017/10/18 下午11:17, Alex Rousskov 写道:
> On 10/17/2017 11:48 PM, duanyao wrote:
>> 在 2017/10/18 上午12:23, Alex Rousskov 写道:
>>> The shared
>>> memory cache does not support caching of Vary-controlled responses yet.
>> I guess this issue will unlikely be fixed any time soon.
> The timing of adding Vary caching support for the shared memory cache is
> largely controlled by you and other Squid users:
>
> http://wiki.squid-cache.org/SquidFaq/AboutSquid#How_to_add_a_new_Squid_feature.2C_enhance.2C_of_fix_something.3F
>

Fair enough, I'll consider it. Maybe I can implement ignoring "Vary: 
Accept-Encoding" as an option, it looks relatively simple.

>> So is there any workaround? Something in my mind:
>> 1) Configure squid to ignore "Vary: Accept-Encoding" and assume all
>> clients can handle any Content-Encoding from original servers (this make
>> sense in my use case).
> Vary is not limited to Content-Encoding. I do not think it is possible
> to configure Squid to ignore Vary (reply_header_access does not work for
> that!), and even if it is possible, it will certainly break web clients
> in all but the most restrictive/limited environments.
>
> You can modify Squid code to ignore Vary, of course. Sorry, I do not
> have a ready-to-use instructions for doing that. Again, disabling Vary
> is a bad idea unless proxied traffic does not use Vary at all.
>

I mean just ignore "Vary: Accept-Encoding" and nothing more —— if the 
original server sends "Vary: User-Agent" or "Vary: Cookie", don't ignore 
them.
To my knowledge, Accept-Encoding and Content-Encoding are only used for 
compressing,
and almost all decent HTTP clients can handle compressed content, so the 
risk looks low enough.

>> 2) Use non-shared memory cache with Rock storage.
> That is always an option, but you should not use SMP then. If you want
> to use rock cache_dirs without SMP, start Squid with -N.

So it's not possible to make each worker process to own a non-shared 
memory cache?
Well, the main point to use Rock is SMP support.

>
> Alex.





More information about the squid-users mailing list