Search squid archive

Re: Yet another store_id question HIT MISS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Omid,

StoreID is not the only thing which can affect a HIT or a MISS.
A nice tool which was written to understand the subject is RedBot at:
https://redbot.org/

>From a simple inspection of the file it seems that it should get  hit but, why are you using StoreID for this object?
Also why are you using:
refresh_pattern -i ^http:\/\/[a-zA-Z0-9\-\_\.]+\.squid\.internal\/.* 10080 95% 86400   override-lastmod override-expire reload-into-ims ignore-reload ignore-must-revalidate ignore-no-store ignore-private 

??
You would only need this for the specific case which the hostname is "dynamic".
This url seems by default cache friendly and only if you have enough details on their cdn network you should try to use StoreID.
Something that may help you is the next log format settings:
logformat cache_headers %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt Q-CC: "%{Cache-Control}>h" "%{Cache-Control}>ha" Q-P: "%{Pragma}>h" "%{Pragma}>ha" REP-CC: "%{Cache-Control}<h" REP-EXP: "%{Expires}<h" VARY: "%{Vary}<h" %>eui
access_log daemon:/var/log/squid/access.log cache_headers

Try to see how the requests for these looks like in the logs.

Eliezer

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer@xxxxxxxxxxxx


-----Original Message-----
From: squid-users [mailto:squid-users-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Omid Kosari
Sent: Wednesday, August 17, 2016 4:44 PM
To: squid-users@xxxxxxxxxxxxxxxxxxxxx
Subject:  Yet another store_id question HIT MISS

Why following link is HIT

X-Cache:"HIT from cache1"
X-Cache-Lookup:"HIT from cache1:3128"


http://igcdn-photos-c-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg

but this one is MISS

http://igcdn-photos-a-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg



store_id_program "/usr/lib/squid/storeid_file_rewrite"
"/etc/squid/storeid_db"
store_id_children 50 startup=10 idle=5 concurrency=50
acl storeiddomainregex dstdom_regex
^igcdn(\-photos|\-videos)[a-z0-9\-]{0,9}\.akamaihd\.net$
store_id_access allow storeiddomainregex
store_id_access deny all
refresh_pattern -i ^http:\/\/[a-zA-Z0-9\-\_\.]+\.squid\.internal\/.* 10080
95% 86400  override-lastmod override-expire reload-into-ims ignore-reload
ignore-must-revalidate ignore-no-store ignore-private  

storeid_db content

^http:\/\/igcdn-.*\.akamaihd\.net/hphotos-ak-.*/(t5.*?)(?:\?|$)
http://instagramcdn.squid.internal/$1


root@cache:~# echo
'http://igcdn-photos-c-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg'
| /usr/lib/squid/storeid_file_rewrite /etc/squid/storeid_db
OK
store-id=http://instagramcdn.squid.internal/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg
root@cache:~# echo
'http://igcdn-photos-a-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg'
| /usr/lib/squid/storeid_file_rewrite /etc/squid/storeid_db
OK
store-id=http://instagramcdn.squid.internal/t51.2885-15/s150x150/e35/13649137_1547514802224163_950421795_n.jpg



StoreId helper Statistics:
program: /usr/lib/squid/storeid_file_rewrite
number active: 10 of 50 (0 shutting down)
requests sent: 1755734
replies received: 1755734
queue length: 0
avg service time: 0 msec

Number of requests bypassed because all StoreId helpers were busy: 0





--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Yet-another-store-id-question-HIT-MISS-tp4678972.html
Sent from the Squid - Users mailing list archive at Nabble.com.
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux