<div dir="ltr"><div class="gmail_extra">
<p class="p1"><span class="s1">squid-3.5.5-1.el6.x86_64</span></p><p class="p1">CentOS 6.6</p><p class="p1"><span class="s1"> This looks like a bug in Squid v3 or a difference from 2.7. Our monitor couldn't be simpler. It requests the SAME URL twice (identical in every way, same hostname too), and expects the 2nd response to contain the X-Squid hit header. If it does not, then Squid has some sort of race condition going on its code.</span></p>
<p class="p1"><span class="s1"> I just reproduced this by hand, using an HTTP sniffer tool. I requested the same URL twice, with about a 0.25 second delay between fetches, and the 2nd attempt was ALSO A MISS. Then I waited 1 second and tried a 3rd time, and it was FINALLY a hit. </span></p>
<p class="p1"><span class="s1">Squid v3 seems to have changed the way it stores objects. Maybe it is doing some sort of "asynchronous" background store now, so if you send in sequential requests without a delay between, it may not actually have finished storing it yet, so it doesn't report a "hit". Meaning, the first "miss" response may have fired off a thread to store the object, and not doing it in the main thread anymore like in v2, if you get my meaning.</span></p><p class="p2"><span class="s1"></span></p>
<p class="p2">For the Squid dev team, here are the headers we are sending back from the origin App VIP:<br><span class="s1"></span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p3"><span class="s1">Accept-Ranges: none</span></p>
<p class="p3"><span class="s1">Access-Control-Allow-Origin: *</span></p>
<p class="p3"><span class="s1"><b>Cache-Control: max-age=300</b></span></p>
<p class="p3"><span class="s1">Connection: close</span></p>
<p class="p3"><span class="s1">Content-Length: 403</span></p>
<p class="p3"><span class="s1">Content-Type: image/jpeg</span></p>
<p class="p3"><span class="s1">Date: Tue, 28 Jul 2015 17:25:36 GMT</span></p>
<p class="p3"><span class="s1">Expires: Tue, 28 Jul 2015 17:30:36 GMT</span></p>
<p class="p3"><span class="s1">Last-Modified: Mon, 11 Jun 2012 04:25:18 GMT</span></p>
<p class="p3"><span class="s1">Server: Apache/2.2.26 (Unix)</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">This should very much be cached right away and it's a simple tiny image.</span></p><p class="p1"><span class="s1"><br></span></p><p class="p1"><span class="s1">One thing we also notice is this only occurs doing load, meaning when we have production load traffic this fails, but if there is no other connections to the box, no other queries, this does not fail. Is it possible that squid is ejecting this that fast or is there another possibility here? Not sure what other data I can provide but will if asked.</span></p><p class="p1"><span class="s1"><br></span></p><p class="p1"><span class="s1">Thanks</span></p><p class="p1"><span class="s1">Tory</span></p><p class="p1"><span class="s1"><br></span></p><p class="p1">
</p><p class="p1"><br></p></div></div>