[squid-users] Squid Accelerator Farms

From: Hugh Buchanan <hugh@dont-contact.us>
Date: Thu, 06 Mar 2003 11:40:24 -0800

Looking through the archives for this list, I don't see too much
discussion regarding accelerator farms.. Most folks using squid aren't
using the software for this purpose, but there must be information
sitting around out there about the topic. I am looking for things like
personal experience writeups on the topic..

I am using a mixture of LVS and Squid, a combo that I have found some
information on.. but not a whole lot. I am trying to optimize my setup
here because I don't feel it is fast enough. I'm getting too many cache
MISSes

My server cluster consists of 8 servers, plus network data storage
devices and the two LVS controllers (a total of 12 machines). I am
finding that my squid accelerator is not really caching much of
anything.. so I have a problem somewhere. The squid accelerator is
behind the LVS controllers, and if I take the LVS setup out of the
picture the problem remains..

I can localize the problem by setting up just two servers.. one squid,
one apache. I loaded a bunch of static HTML and PNG files onto the
apache machine (no NFS involved), and setup the squid server to
accelerate the apache server. Despite my simple configuration, the
squid machine doesn't cache anything for me.

As suggested by Henrik, I enabled mime header logging. I get this:

66.28.178.17 - - [06/Mar/2003:14:29:48 -0500] "GET
http://gre.mydomain.com/images/admin/logo-vlinto.png HTTP/1.1" 304 216
TCP_REFRESH_HIT:DIRECT [Host: gre.mydomain.com\r\nUser-Agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b)
Gecko/20030211\r\nAccept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\nAccept-Language:
en-us,en;q=0.5\r\nAccept-Encoding:
gzip,deflate,compress;q=0.9\r\nAccept-Charset:
ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive:
300\r\nConnection: keep-alive\r\nCookie: slp=bhdwskGnLiGVI1046565860;
LOGIN=hugh\r\nIf-Modified-Since: Thu, 28 Jun 2001 00:08:05
GMT\r\nIf-None-Match: "32e6a3-4cc-3b3a7565"\r\nCache-Control:
max-age=0\r\n] [HTTP/1.1 304 Not Modified\r\nDate: Thu, 06 Mar 2003
19:29:48 GMT\r\nServer: Apache/1.3.22 (Unix) PHP/4.0.6
mod_perl/1.26\r\nConnection: Keep-Alive\r\nKeep-Alive: timeout=15,
max=99\r\nETag: "32e6a3-4cc-3b3a7565"\r\n\r]

So I have the entry, "Cache-Control: max-age=0". This is put in by the
squid server to request a fresh copy of the file right?

Is my problem caused by the fact that the file I am using to test is two
years old? This file isn't going to get any younger... I don't believe
I should have to go in and update all my files to be fresher.

Anyone have any ideas?

My config is below for reference. Thanks in advance,

Hugh

------ BEGIN SQUID.CONF FILE -----
cache_mem 384 MB
cache_dir ufs /home/squid/cache 1024 16 256

refresh_pattern . 0 20% 4320

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80
acl CONNECT method CONNECT

http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
http_access allow localhost

visible_hostname www.mydomain.com
unique_hostname squid.mydomain.com

httpd_accel_host www-priv1.mydomain.com
httpd_accel_port 80
httpd_accel_with_proxy off
httpd_accel_uses_host_header on
log_mime_hdrs on

forwarded_for on

#cache_store_log /dev/null
#cache_access_log /dev/null
cache_store_log /var/log/squid/store.log
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log

maximum_object_size 32768 KB
maximum_object_size_in_memory 32 KB

redirect_program /usr/etc/vlinto
redirect_children 64
redirector_bypass off
---- END FILE ----
Received on Thu Mar 06 2003 - 12:40:23 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:13:57 MST