It seems that only if the http request is sent from same server where
the squid instance has the object, then its sibling will retrieve it
from this server. If the request is sent from a different box, no ICP
communication goes on. Why?
-----Original Message-----
From: Lu, Roy [mailto:rlu_at_FACorelogic.com]
Sent: Tuesday, June 30, 2009 5:26 PM
To: squid-users_at_squid-cache.org
Subject: RE: [squid-users] Strange problem with sibling squids in
accelerator mode
I am using version 3.0 stable 16.
-----Original Message-----
From: Lu, Roy [mailto:rlu_at_FACorelogic.com]
Sent: Tuesday, June 30, 2009 5:24 PM
To: squid-users_at_squid-cache.org
Subject: [squid-users] Strange problem with sibling squids in
accelerator mode
Hi,
I encountered a strange problem in using sibling squids as accelerators.
I have two accelerator squids, A and B (on two different boxes). They
are set up as sibling cache peers which both point to the same parent
cache_peer origin content server. I used the following commands to run
my test:
1. Load an object into A:
%squidclient -h host.name.of.A URL
2. Purge the object from B:
%squidclient -h host.name.of.B -m PURGE URL
3. Double check to make sure A has the object and B does not:
%squidclient -h host.name.of.A -m HEAD -H "Cache-Control:
only-if-cached\n" URL
Resulted in TCP_MEM_HIT
%squidclient -h host.name.of.B -m HEAD -H "Cache-Control:
only-if-cached\n" URL
Resulted in TCP_MISS
4. Request the object from B:
%squidclient -h host.name.of.B URL
Now the strange problem comes in. If I run the last step on the box A,
the ICP communication occurs, and in A's log I see UDP_HIT and
TCP_MEM_HIT, and in B's log I see TCP_MISS and SIBLING_HIT. However, if
I run the last step in B, then there is no ICP communication, squid B
simply goes to the parent origin server to get the object (in B's log
FIRST_UP_PARENT and nothing in A's log). When I run the same test with
squidclient on a third machine, the result is negative too. So it seems
that only if I run the squidclient utility on the same box where the
cached object is, then its sibling cache will retrieve the object from
this box.
The configuration for Squid A is:
#=======================================================================
====================
# ACL changes
#=======================================================================
====================
# acl for purge method
acl acl_purge method purge
# acl for origin app server
acl acl_gpl_app_servers dstdomain vmprodcagpcna04.firstamdata.net
# acl for cache peer squid server
acl acl_gpl_cache_sibling src host.name.of.A
#=======================================================================
====================
# http_access changes
#=======================================================================
====================
# allow purge method from localhost or sibling
http_access allow acl_purge localhost
http_access allow acl_purge acl_gpl_cache_sibling
http_access deny acl_purge
# allow http access to app servers and from cache sibling
http_access allow acl_gpl_app_servers
http_access allow acl_gpl_cache_sibling
#=======================================================================
====================
# icp_access changes
#=======================================================================
====================
# allow icp queries from cache sibling
icp_access allow acl_gpl_cache_sibling
#=======================================================================
====================
# cache_peer changes
#=======================================================================
====================
cache_peer vmprodcagpcna04.firstamdata.net parent 7533 0 no-query
originserver name=cp_gpl_app_servers
cache_peer host.name.of.A sibling 3128 3130 name=cp_gpl_cache_sibling
proxy-only
#=======================================================================
====================
# cache_peer_access changes
#=======================================================================
====================
# Allow peer connection to the origin app server and sibling cache peer
cache_peer_access cp_gpl_app_servers allow acl_gpl_app_servers
cache_peer_access cp_gpl_cache_sibling allow acl_gpl_cache_sibling
Configuration for B is almost identical except the host.name.of.A in the
acl and cache_peer tags is switched with B's.
Can someone point out what might be the problem here?
Thanks.
Roy
************************************************************************
******************
This message may contain confidential or proprietary information
intended only for the use of the
addressee(s) named above or may contain information that is legally
privileged. If you are
not the intended addressee, or the person responsible for delivering it
to the intended addressee,
you are hereby notified that reading, disseminating, distributing or
copying this message is strictly
prohibited. If you have received this message by mistake, please
immediately notify us by
replying to the message and delete the original message and any copies
immediately thereafter.
Thank you.
************************************************************************
******************
FACLD
Received on Wed Jul 01 2009 - 18:04:50 MDT
This archive was generated by hypermail 2.2.0 : Thu Jul 02 2009 - 12:00:01 MDT