LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Making squid work

[ILUG] Making squid work

Niall O Broin niall at linux.ie
Sat Oct 6 22:32:53 IST 2001


On Sat, Oct 06, 2001 at 04:16:23PM -0400, Wesley Darlington wrote:

> > You're forgiven :-) but it's close enough - within one minute of my cesium
> > clock's display.
> 
> Ooooh - Shiny!

Yes, it is - a shiny silver box, without unfortunately any way of connecting
it to a PC (any way, that is, less manual than the date command and some
hand eye co-ordination :-( )

> I've been doing some more investigating here. I've noticed that from time
> to time I get TCP_MISSes when I reload the page. Aiee - you've broken my
> netscape! :-)

You should have always got some of those from e.g. fetches of ad. GIFs etc.
but that's OK - a TCP_MISS just means something is not in the cache, or
won't be cached e.g. regex matches to cgi-bin or ?. It's the bloody
TCP_CLIENT_REFRESH_MISS that are caused by the stupid Pragma: no-cache as
mentioned.


> I then told netscape to stop using squid, kept the caches at zero, fired up 
> sniffit and tried getting Netscape to reload the page. I looked in sniffit's

Did you jyst request the page again Netscape, or did you ask it to reload ?
I always thought that reload (Alt+R) on Netscape reloaded the page only
(presumably sending a no-cache) and that Alt+Shift+R reloaded everything. 
I just did a reload on the UF page and got the expected behaviour (reloaded
page + ads but the other language GIFs just popped back, persumably from
Netscape's memory cache). Then I did an Alt+Shift+R and everything was
reloaded.

> files and what do I see, but things like...
> 
> GET /images/brugervenlig.gif HTTP/1.0
> Referer: http://www.userfriendly.org/cartoons/archives/
> Connection: Keep-Alive
> User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.18-lvm-reiserfs-r i686)
> Pragma: no-cache

Yes, this is the dark skinned person in the pile of combustible material
alright, but if this was the result of a full reload, it's what you'd expect.

> Note that "Pragma: no-cache" in there. Stupid damn browser! (I can't see

It certainly looks that way. But why only when the browser is on the same
machine as squid ?

> an easy way to sniff just the traffic that netscape sends to my local
> squid.)

Yes, bit of a trick that. You'd need a program like tee which would listen
on port X, pass on to port Y, and then send traffic in one direction or the
other (or both) to somewhere else - file or stdout, or even another port.

> I wonder ... if you go back to the other computer and do some reloading,
> do you now get some MISSes? I'm doing a combination of reloading a few
> times and looking at another page and going back to the UF cartoon
> archive page.
> 
> (Thought: Does your laptop have the same time as the squid box?)

Again, close enough for government work. And I just used ntp to sync my main
box to a time server, and rdate'ed that over to the notebook, so we're all
now reading the same fob watch. Cusriously, I just now did some more tests.
Same procedure - shutdown Netscape, restart and load the page. The squid box
Netscape still reloads everything from the server but the notebook gets them
from the cache. However, in my last round of testing I only noticed
TCP_MEM_HIT when the notebook requested those GIFs - now I'm getting
TCP_IMS_HIT. However, a look back through the log shows some TCP_IMS_HIT
lines earlier for those GIFs from the notebook so that's the same -
something to do with expiry of objects without specific dates I imagine.

> Just did some more testing. My squid.conf had the line...
> 
> #refresh_pattern        .               0       20%     4320
> 
> ...in it. (ie. commented out.) I changed this to...
> 
> refresh_pattern        .               0       20%     4320	reload-into-ims
> 
> ...and I now get TCP_HITs or sometimes TCP_REFRESH_HITs. I assume that
> squid is doing an if-modified-since request of some sort. If I change
> reload-into-ims to ignore-reload, I get only TCP_HITs. I get no MISSes. [0]
> 
> Perhaps violating http in this way will help squid compensate for netscape's
> apparent brokenness?

Hmm - interesting options. Sounds like reload-into-ims should do the
business nicely. This is my personal squid, so bugger protocol violation.

However, I'm still extremely puzzled as to why Netscape on the notebook
works as I'd like it to. I'm going to install Netscape 6 (yes, I know, but
just for testing) on the squid box and see what happens with that.




Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell