Search squid archive

RE: Squid: no_cache directive issue.

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

 



Squid is configured as a kind of transparent proxy.

wget resolve the name for domain.com as the ip address of squid server.
When squid tries to resolve domain.com it asks to a dns server who
answer the ip address of the Alteon VIP. In that way it work as a
transparent proxy.

Thanks in advance,

Fabiano

-----Original Message-----
From: trainier@xxxxxxxxxx [mailto:trainier@xxxxxxxxxx] 
Sent: Monday, October 10, 2005 12:40 PM
To: squid-users@xxxxxxxxxxxxxxx
Subject: Re:  Squid: no_cache directive issue.

Pardon the standard "is it plugged in?" question, but....

Does wget know there's a proxy server it needs to go through?
Unless you're running the proxy via port 80 (or it's transparent), wget 
does not appear to be going through a proxy, which would
make your test useless.

If your proxy is not set up transparently, you need to set the
environment 
variable: http_proxy=ipaddress:port of the proxy server.

Just a thought.  :-)

Tim Rainier
Information Services, Kalsec, INC
trainier@xxxxxxxxxx



"Fabiano Silos Reis" <fsilos@xxxxxx> 
10/10/2005 12:31 PM

To
<squid-users@xxxxxxxxxxxxxxx>
cc

Subject
 Squid: no_cache directive issue.






Hello,

Is there any kind of memory cache even if the object is marked to not to
be cached?

On my tests:

I tried with 

acl someserver dstdomain domain.com
no_cache deny someserver

Using wget to debug it I have:

[root@squid bin]# wget -S  -O x http://domain.com/
--10:04:43--  http://domain.com/
           => `x'
Resolving domain.com... 10.0.19.2
Connecting to domain.com[10.0.19.2]:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.0 302 Moved Temporarily
 2 Date: Mon, 10 Oct 2005 13:04:42 GMT
 3 Server: Apache/2.0.54 (Unix)
 4 Location: http://domain.com/@/
 5 Content-Length: 286
 6 Content-Type: text/html; charset=iso-8859-1
 7 X-Cache: MISS from squid.domain.com
 8 Connection: keep-alive
Location: http://domain.com/@/ [following]
--10:04:43--  http://domain.com/@/
           => `x'
Connecting to domain.com[10.0.19.2]:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.0 200 OK
 2 Date: Mon, 10 Oct 2005 13:04:42 GMT
 3 Server: Apache/2.0.54 (Unix)
 4 Content-Length: 1252
 5 Content-Type: text/html
 6 X-Cache: MISS from squid.domain.com
 7 Connection: keep-alive

100%[=======================================>] 1,252         --.--K/s

10:04:43 (11.94 MB/s) - `x' saved [1,252/1,252]

As you can see the answer is not being cached by the squid server. 

Explaining more about domain.com:

Domain.com is being served by 2 webservers that are on the back of a
Alteon Switch. These two are real servers for a virtual server. Alteon
manipulates the connection as a transparent balancer and it is
configured with round robin algorithm, it is, each connection to port 80
of the virtual server is redirected to a real server. 

In the body of the HTML I put a debug message to know where the answer
came from. In this case if the answer came from 'webserver1' I will see
in the body the phrase: "this came from webserver1".

My problem:

If the content is not being cached why do I receive only answers from
webserver1 when I get from squid? I tried running wget lot of times and
I always get in the body the same answer caming from webserver1. 

If I point wget to get the content direct from the virtual server
(Configured in the alteon switch) I receive different body on each get. 


What I think it is happening:

I think this is being caused by some memory cache algorithm. Even being
explicit saying to squit to not to cache a content it retain the object
for seconds in its memory.

I did a test on my server wich is very simple. I wget just one time from
http://domain.com and after exactly 15 seconds I wget it again and there
it is. The body came with the debug flag from "webserver2". Is it a
proof of something or not?

I appreciate any help.

Fabiano

Here is my squid.conf:

http_port 10.0.19.2:80
cache_mem 64 MB
maximum_object_size 4096 KB
maximum_object_size_in_memory 100 KB
fqdncache_size 1024
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir ufs /iG/http_servers/squid/bin/var/cache 40000 16 256
cache_access_log /iG/logs/squidzone/zis-01-access_log
logfile_rotate 0
cache_log /iG/http_servers/squid/bin/var/logs/cache.log
cache_store_log /iG/http_servers/squid/bin/var/logs/store.log
#cache_store_log none
emulate_httpd_log on
debug_options NONE,0
log_fqdn off
redirect_rewrites_host_header on

acl someserver dstdomain zone.ig.com.br
no_cache deny someserver
#always_direct allow someserver

acl alteon src 10.0.0.0/255.0.0.0
acl PURGE method PURGE
http_access allow PURGE alteon
http_access deny PURGE

quick_abort_min 0 KB
quick_abort_max 0 KB
half_closed_clients off
shutdown_lifetime 10 seconds
acl all src 0.0.0.0/0.0.0.0
acl in_localhost src 127.0.0.0/8
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80
acl CONNECT method CONNECT
acl to_rz dst 10.0.0.0/255.0.0.0
acl internal_port port 80
http_access allow all to_rz
http_access allow Safe_ports
http_access allow internal_port
http_access allow in_localhost to_localhost
http_access deny CONNECT SSL_ports
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname squid.domain.com
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy off
httpd_accel_uses_host_header on
client_db off
coredump_dir /var/cache

squid -v

[root@zis-01 bin]# sbin/squid -v
Squid Cache: Version 2.5.STABLE11-RC2
configure options:  --prefix=/squid/bin-2.5.11-RC2 --enable-underscores
'--enable-removal-policies=lru heap' '--enable-err-languages=English
Portuguese' --enable-default-err-language=Portuguese
--enable-referrer-log --enable-useragent-log '--enable-storeio=ufs
diskd' --with-pthreads





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

  Powered by Linux