[squid-users] ERR_ONLY_IF_CACHED_MISS and cache digests problem

Amos Jeffries squid3 at treenet.co.nz
Thu Apr 23 05:48:51 UTC 2015


On 23/04/2015 5:10 p.m., Victor Sudakov wrote:
> Dear Colleagues,
> 
> I have two squid-3.5.3 proxies configured as mutual siblings:
> 
> ==== proxy:/usr/local/etc/squid/squid.conf
> 
> acl internal src 212.73.124.0/28
> http_access allow internal
> cache_peer proxy2.sibptus.ru sibling 3128 3130
> 
> ==== proxy2:/usr/local/etc/squid/squid.conf
> 
> acl cisa_servers src 212.73.124.0/28
> http_access allow cisa_servers
> cache_peer proxy.sibptus.ru sibling 3128 3130
> 
> I believe this is a correct configuration. The users' browsers are
> configured to use proxy2.sibptus.ru, but sometimes users see the
> ERR_ONLY_IF_CACHED_MISS error from proxy.sibptus.ru!
> 
> Both proxies are compiled with cache digest support. I think it's on
> by default. However, the problem seems to disappear when I add the
> "no-digest" flag to the cache_peer definitions.
> 
> What is wrong with my setup? Is anything wrong with mutual siblings
> and cache digests?
> 

I dont think anything is wrong wth either. Its more a collision in how
the features work vs the protocols.

Cache Digests (CD) are exchanged periodically and updated approx hourly.
Also they are based on just the URL. So there is always a gap where they
may not be accurate for any highly volatile objects, and variant objects
(using Vary headers) will have a high false-positive rate.

only-if-cached requires the *right now* state of the object to be fresh
and in cache. It takes account of both the URL and the entire HTTP
headers. So

The ICP protocol used as a backup to confirm objects existence also
suffers the same URL basis problem as CD. They work fine for HTTP/1.0
but HTTP/1.1 features dont fare quite so well.

My recommendation these days is to use HTCP instead of ICP. Since you
seem to need accuracy HTCP would probably suit your needs better than CD
as well.

Amos



More information about the squid-users mailing list