Re: http accelerator questions

From: Jon Drukman <[email protected]>
Date: Fri, 16 Jul 1999 16:15:22 -0700

At 03:39 PM 7/16/99 , Henrik Nordstrom wrote:
>Jon Drukman wrote:
>
>> the first line shows a 200 status code. why does it keep checking in the
>> subsequent requests instead of serving the cached version?
>
>Can't tell from this information alone. If you enable log_mime_hdr then
>it will be possible to tell from your access.log (and squid.conf to some
>extent).

cool, didn't know about that feature. it helps a lot.

here's the story. first request works as expected:

206.169.18.74 - - [16/Jul/1999:16:03:15 -0700] "GET
http://hudsucker.gamespot.com/shared/mezzotint.gif HTTP/1.0" 200 2483
TCP_MISS:DIRECT [Connection: Keep-Alive%0d%0aUser-Agent: Mozilla/4.51
%5ben%5d (X11%3b I%3b FreeBSD 3.1-RELEASE i386)%0d%0aHost:
attitude%0d%0aAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
image/png, */*%0d%0aAccept-Encoding: gzip%0d%0aAccept-Language:
en%0d%0aAccept-Charset: iso-8859-1,*,utf-8%0d%0a] [HTTP/1.1 200
OK%0d%0aDate: Fri, 16 Jul 1999 23:03:58 GMT%0d%0aServer: Apache/1.3.6
(Unix)%0d%0aCache-Control: max-age=120%0d%0aExpires: Fri, 16 Jul 1999
23:05:58 GMT%0d%0aLast-Modified: Fri, 16 Jul 1999 23:03:52 GMT%0d%0aETag:
%22258a5-841-378fba58%22%0d%0aAccept-Ranges: bytes%0d%0aContent-Length:
2113%0d%0aKeep-Alive: timeout=15, max=100%0d%0aConnection:
Keep-Alive%0d%0aContent-Type: image/gif%0d%0a%0d]

hitting reload in Netscape 4.6 causes it to recheck the master server, always:

206.169.18.74 - - [16/Jul/1999:16:03:58 -0700] "GET
http://hudsucker.gamespot.com/shared/mezzotint.gif HTTP/1.0" 304 260
TCP_MISS:DIRECT [If-Modified-Since: Fri, 16 Jul 1999 23:03:52 GMT%3b
length=2113%0d%0aConnection: Keep-Alive%0d%0aUser-Agent: Mozilla/4.51
%5ben%5d (X11%3b I%3b FreeBSD 3.1-RELEASE i386)%0d%0aPragma:
no-cache%0d%0aHost: attitude%0d%0aAccept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, image/png, */*%0d%0aAccept-Encoding:
gzip%0d%0aAccept-Language: en%0d%0aAccept-Charset:
iso-8859-1,*,utf-8%0d%0a] [HTTP/1.1 304 Not Modified%0d%0aDate: Fri, 16 Jul
1999 23:04:40 GMT%0d%0aServer: Apache/1.3.6 (Unix)%0d%0aConnection:
Keep-Alive%0d%0aKeep-Alive: timeout=15, max=100%0d%0aETag:
%22258a5-841-378fba58%22%0d%0aExpires: Fri, 16 Jul 1999 23:06:40
GMT%0d%0aCache-Control: max-age=120%0d%0a%0d]

then i switch to my windows box, running IE 5 and load the image. it works
as i expect:

206.169.18.211 - - [16/Jul/1999:16:04:38 -0700] "GET
http://hudsucker.gamespot.com/shared/mezzotint.gif HTTP/1.1" 200 2483
TCP_MEM_HIT:NONE [Accept: application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*%0d%0aAccept-Language: en-us%0d%0aAccept-Encoding: gzip,
deflate%0d%0aUser-Agent: Mozilla/4.0 (compatible%3b MSIE 5.0%3b Windows
98%3b DigExt)%0d%0aHost: attitude%0d%0aConnection: Keep-Alive%0d%0a]
[HTTP/1.1 200 OK%0d%0aDate: Fri, 16 Jul 1999 23:03:58 GMT%0d%0aServer:
Apache/1.3.6 (Unix)%0d%0aCache-Control: max-age=120%0d%0aExpires: Fri, 16
Jul 1999 23:05:58 GMT%0d%0aLast-Modified: Fri, 16 Jul 1999 23:03:52
GMT%0d%0aETag: %22258a5-841-378fba58%22%0d%0aAccept-Ranges:
bytes%0d%0aContent-Length: 2113%0d%0aKeep-Alive: timeout=15,
max=100%0d%0aConnection: Keep-Alive%0d%0aContent-Type: image/gif%0d%0a%0d]

i hit reload on IE 5 and it's all still good:

206.169.18.211 - - [16/Jul/1999:16:04:47 -0700] "GET
http://hudsucker.gamespot.com/shared/mezzotint.gif HTTP/1.1" 304 237
TCP_IMS_HIT:NONE [Accept: */*%0d%0aAccept-Language:
en-us%0d%0aAccept-Encoding: gzip, deflate%0d%0aIf-Modified-Since: Fri, 16
Jul 1999 23:03:52 GMT%3b length=2113%0d%0aUser-Agent: Mozilla/4.0
(compatible%3b MSIE 5.0%3b Windows 98%3b DigExt)%0d%0aHost:
attitude%0d%0aConnection: Keep-Alive%0d%0a] [HTTP/1.0 304 Not
Modified%0d%0aDate: Fri, 16 Jul 1999 23:03:58 GMT%0d%0aContent-Type:
image/gif%0d%0aExpires: Fri, 16 Jul 1999 23:05:58 GMT%0d%0aLast-Modified:
Fri, 16 Jul 1999 23:03:52 GMT%0d%0a%0d]

once the object expires, however, if i keep reloading on IE, it keeps
rechecking the original:

206.169.18.211 - - [16/Jul/1999:16:08:05 -0700] "GET
http://hudsucker.gamespot.com/shared/mezzotint.gif HTTP/1.1" 304 259
TCP_REFRESH_HIT:DIRECT [Accept: */*%0d%0aAccept-Language:
en-us%0d%0aAccept-Encoding: gzip, deflate%0d%0aIf-Modified-Since: Fri, 16
Jul 1999 23:03:52 GMT%3b length=2113%0d%0aUser-Agent: Mozilla/4.0
(compatible%3b MSIE 5.0%3b Windows 98%3b DigExt)%0d%0aHost:
attitude%0d%0aConnection: Keep-Alive%0d%0a] [HTTP/1.1 304 Not
Modified%0d%0aDate: Fri, 16 Jul 1999 23:08:47 GMT%0d%0aServer: Apache/1.3.6
(Unix)%0d%0aConnection: Keep-Alive%0d%0aKeep-Alive: timeout=15,
max=100%0d%0aETag: %22258a5-841-378fba58%22%0d%0aExpires: Fri, 16 Jul 1999
23:10:47 GMT%0d%0aCache-Control: max-age=120%0d%0a%0d]

My questions are:

When you hit Reload in a browser is it supposed to force Squid to recheck
with the master? I would think the answer should be "no". IMHO, Squid
should return the cached object as long as it hasn't expired.

Either Netscape or IE is buggy... no surprise there. Can Squid be patched
to ignore the buggy browser?

After the object expires, Squid seems to recheck constantly. Is this
correct? It seems like a bug. If I change the original file it works OK
again until the Expires time is hit.

What's the difference between TCP_MEM_HIT and TCP_IMS_HIT?

Jon Drukman
Director Of Technology
GameSpot
Received on Fri Jul 16 1999 - 16:51:03 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:47:26 MST