Problem with Sibling squids

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with Sibling squids

Santiago del Castillo-2
Hi!

I've set up a 5 squid sibling relationship. The problem is that when I
restart them, they start sending ICPs without problem. But after a few
seconds (no more than 20 seconds), they stop sending ICPs and start
working as normal squids and I can't find why!  :(

This squids are caching images and swf's of a lot of high traffic
sites. So i wanted to make them share their content in order to
improve memory usage.

Here's my config:

acl RedPlaid src 208.XX.XX.0/255.255.255.0
acl squid1 src 208.74.XX.XX
acl squid2 src  208.74.XX.XX
acl squid3 src 208.74.XX.XX
acl squid4 src 208.74.XX.XX
acl squid5 src 208.74.XX.XX
acl AllowedSites dstdomain "/etc/squid/allowed_sites"
acl DeniedSites url_regex "/etc/squid/denied_sites"

http_access allow AllowedSites !DeniedSites
http_access allow localhost
http_access deny all

icp_access allow RedPlaid
icp_access deny all

miss_access deny squid1 squid2 squid3 squid4
miss_access allow all

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off

httpd_accel_with_proxy on

httpd_accel_uses_host_header on

log_icp_queries on
icp_hit_stale on

cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss


Any clue??


Thanks!
Santiago
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

Juraj Sakala
Hi,

> Here's my config:
>
> acl RedPlaid src 208.XX.XX.0/255.255.255.0
> acl squid1 src 208.74.XX.XX
> acl squid2 src  208.74.XX.XX
> acl squid3 src 208.74.XX.XX
> acl squid4 src 208.74.XX.XX
> acl squid5 src 208.74.XX.XX
> acl AllowedSites dstdomain "/etc/squid/allowed_sites"
> acl DeniedSites url_regex "/etc/squid/denied_sites"
>
> http_access allow AllowedSites !DeniedSites
> http_access allow localhost
Try this:
http_access allow RedPlaid
I think this was problem

> http_access deny all
>
> icp_access allow RedPlaid
> icp_access deny all
>
> miss_access deny squid1 squid2 squid3 squid4
> miss_access allow all
>
> httpd_accel_host virtual
> httpd_accel_port 80
> httpd_accel_single_host off
>
> httpd_accel_with_proxy on
>
> httpd_accel_uses_host_header on
>
> log_icp_queries on
> icp_hit_stale on
>
> cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
> cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
> cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
> cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
Do you see something like this in access.log?:
1181021372.535    545 x.x.x.x TCP_MISS/200 6784 GET
http://www.google.sk/images/nav_logo3.png - SIBLING_HIT/someproxy image/png

Regards
Juraj
K K
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

K K
You might consider enabling Cache Digests (see
http://wiki.squid-cache.org/SquidFaq/CacheDigests).

If squid is compiled with --enable-cache-digests,  you can configure
peers to periodically share a hashed summary of cached objects instead
of using ICP to check as requests come in.

Checking the local RAM digests for several peers is (nearly always)
more efficient than sending out ICP requests to the same number of
peers and then waiting for responses from all peers.  Drawbacks are
the overhead to build and transfer digests every X minutes, and also
you miss out on hits that would have been successful with ICP,
particularly the extremely efficient UDP_HIT_OBJ type :)

Kevin
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

Santiago del Castillo-2
In reply to this post by Santiago del Castillo-2
Hi juraj,

Added that line and didn't help :(.

This is what happens:

1) Squids were configured without sibling.
2) Configured sibling on each squid as showed before (4 cache_peer
lines per squid, total 5 squids).
3) Reloaded (not restarted) squid. Sibling started working.... After a
while (~20 secs). Stopped working.
4) Changed some settings (disable siblings, reloaded, enabled
siblings, reloaded) and no ICP requests were sent.
5) Restarted Squid and sibling started working again for ~20 secs again.

So every change I make I have to restart squid :(

About if I see SIBLING_HITs on my access.log, yes, for those 20 secs
sibling works. I see SIBLING_HITs :(

Thank you!
Santiago

On 6/5/07, Juraj Sakala <[hidden email]> wrote:

> Hi,
>
> > Here's my config:
> >
> > acl RedPlaid src 208.XX.XX.0/255.255.255.0
> > acl squid1 src 208.74.XX.XX
> > acl squid2 src  208.74.XX.XX
> > acl squid3 src 208.74.XX.XX
> > acl squid4 src 208.74.XX.XX
> > acl squid5 src 208.74.XX.XX
> > acl AllowedSites dstdomain "/etc/squid/allowed_sites"
> > acl DeniedSites url_regex "/etc/squid/denied_sites"
> >
> > http_access allow AllowedSites !DeniedSites
> > http_access allow localhost
> Try this:
> http_access allow RedPlaid
> I think this was problem
>
> > http_access deny all
> >
> > icp_access allow RedPlaid
> > icp_access deny all
> >
> > miss_access deny squid1 squid2 squid3 squid4
> > miss_access allow all
> >
> > httpd_accel_host virtual
> > httpd_accel_port 80
> > httpd_accel_single_host off
> >
> > httpd_accel_with_proxy on
> >
> > httpd_accel_uses_host_header on
> >
> > log_icp_queries on
> > icp_hit_stale on
> >
> > cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
> > cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
> > cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
> > cache_peer 208.74.XX.XX sibling 80 3130 proxy-only no-digest allow-miss
> Do you see something like this in access.log?:
> 1181021372.535    545 x.x.x.x TCP_MISS/200 6784 GET
> http://www.google.sk/images/nav_logo3.png - SIBLING_HIT/someproxy
image/png
>
> Regards
> Juraj
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

Santiago del Castillo-2
In reply to this post by Santiago del Castillo-2
Hi Kevin,

I want to try both. Cache Digest and no-digest, because I want to run
two benchmarks. Cache-Digests it's very very useful if you have
mid/high latency between squids. Since my latency it's <1 ms, ICP
isn't a big problem for me. I can afford an ICP request per every HTTP
request. But of course i won't discard using Cache Digest to see what
is better in my case.

Thanks a lot!
Santiago


On 6/5/07, K K <[hidden email]> wrote:

> You might consider enabling Cache Digests (see
> http://wiki.squid-cache.org/SquidFaq/CacheDigests).
>
> If squid is compiled with --enable-cache-digests,  you can configure
> peers to periodically share a hashed summary of cached objects instead
> of using ICP to check as requests come in.
>
> Checking the local RAM digests for several peers is (nearly always)
> more efficient than sending out ICP requests to the same number of
> peers and then waiting for responses from all peers.  Drawbacks are
> the overhead to build and transfer digests every X minutes, and also
> you miss out on hits that would have been successful with ICP,
> particularly the extremely efficient UDP_HIT_OBJ type :)
>
> Kevin
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

Juraj Sakala
In reply to this post by Juraj Sakala
> Added that line and didn't help :(.
>
> This is what happens:
>
> 1) Squids were configured without sibling.
> 2) Configured sibling on each squid as showed before (4 cache_peer
> lines per squid, total 5 squids).
> 3) Reloaded (not restarted) squid. Sibling started working.... After a
> while (~20 secs). Stopped working.
> 4) Changed some settings (disable siblings, reloaded, enabled
> siblings, reloaded) and no ICP requests were sent.
> 5) Restarted Squid and sibling started working again for ~20 secs again.
>
> So every change I make I have to restart squid :(
>
> About if I see SIBLING_HITs on my access.log, yes, for those 20 secs
> sibling works. I see SIBLING_HITs :(

It is strange problem. I use ICP without problems. Which version of squid do
you use?
Do you have checked cache.log?

This is part of my working config, perhaps it will be helpful for you:

Proxy1:
icp_port 3130
icp_hit_stale off
cache_peer proxy2 sibling 3128  3130  no-netdb-exchange proxy-only no-digest
no-delay
log_icp_queries off
icp_query_timeout 500
http_access allow Proxy2
icp_access allow Proxy2
visible_hostname Proxy1

Proxy2:
icp_port 3130
icp_hit_stale off
cache_peer proxy1 sibling 3128  3130  no-netdb-exchange proxy-only no-digest
no-delay
log_icp_queries off
icp_query_timeout 500
http_access allow Proxy1
icp_access allow Proxy1
visible_hostname Proxy2
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

Sunil K.P.
Greetings,

Thanks a lot.
I was having problems with the sibling hits and it got solved.

Regards
Sunil

----- Original Message -----
From: "Juraj Sakala" <[hidden email]>
To: "Santiago Del Castillo" <[hidden email]>
Cc: <[hidden email]>
Sent: Tuesday, June 05, 2007 2:21 PM
Subject: Re: [squid-users] Problem with Sibling squids


>> Added that line and didn't help :(.
>>
>> This is what happens:
>>
>> 1) Squids were configured without sibling.
>> 2) Configured sibling on each squid as showed before (4 cache_peer
>> lines per squid, total 5 squids).
>> 3) Reloaded (not restarted) squid. Sibling started working.... After a
>> while (~20 secs). Stopped working.
>> 4) Changed some settings (disable siblings, reloaded, enabled
>> siblings, reloaded) and no ICP requests were sent.
>> 5) Restarted Squid and sibling started working again for ~20 secs again.
>>
>> So every change I make I have to restart squid :(
>>
>> About if I see SIBLING_HITs on my access.log, yes, for those 20 secs
>> sibling works. I see SIBLING_HITs :(
>
> It is strange problem. I use ICP without problems. Which version of squid
> do
> you use?
> Do you have checked cache.log?
>
> This is part of my working config, perhaps it will be helpful for you:
>
> Proxy1:
> icp_port 3130
> icp_hit_stale off
> cache_peer proxy2 sibling 3128  3130  no-netdb-exchange proxy-only
> no-digest
> no-delay
> log_icp_queries off
> icp_query_timeout 500
> http_access allow Proxy2
> icp_access allow Proxy2
> visible_hostname Proxy1
>
> Proxy2:
> icp_port 3130
> icp_hit_stale off
> cache_peer proxy1 sibling 3128  3130  no-netdb-exchange proxy-only
> no-digest
> no-delay
> log_icp_queries off
> icp_query_timeout 500
> http_access allow Proxy1
> icp_access allow Proxy1
> visible_hostname Proxy2

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

Santiago del Castillo-2
In reply to this post by Santiago del Castillo-2
Nothing :(

I'm using version 2.5.STABLE14
I've checked cache.log, nothing appears :(

nothing comes into my mind! I used tethereal to see if the switch or
some kind of firewall were filtering packets, but it's not the case :(,
packets stop being sent by squids :(

I'm about to start crying! :(

On 6/5/07, Juraj Sakala <[hidden email]> wrote:

> > Added that line and didn't help :(.
> >
> > This is what happens:
> >
> > 1) Squids were configured without sibling.
> > 2) Configured sibling on each squid as showed before (4 cache_peer
> > lines per squid, total 5 squids).
> > 3) Reloaded (not restarted) squid. Sibling started working.... After a
> > while (~20 secs). Stopped working.
> > 4) Changed some settings (disable siblings, reloaded, enabled
> > siblings, reloaded) and no ICP requests were sent.
> > 5) Restarted Squid and sibling started working again for ~20 secs again.
> >
> > So every change I make I have to restart squid :(
> >
> > About if I see SIBLING_HITs on my access.log, yes, for those 20 secs
> > sibling works. I see SIBLING_HITs :(
>
> It is strange problem. I use ICP without problems. Which version of
squid do
> you use?
> Do you have checked cache.log?
>
> This is part of my working config, perhaps it will be helpful for you:
>
> Proxy1:
> icp_port 3130
> icp_hit_stale off
> cache_peer proxy2 sibling 3128  3130  no-netdb-exchange proxy-only
no-digest

> no-delay
> log_icp_queries off
> icp_query_timeout 500
> http_access allow Proxy2
> icp_access allow Proxy2
> visible_hostname Proxy1
>
> Proxy2:
> icp_port 3130
> icp_hit_stale off
> cache_peer proxy1 sibling 3128  3130  no-netdb-exchange proxy-only
no-digest
> no-delay
> log_icp_queries off
> icp_query_timeout 500
> http_access allow Proxy1
> icp_access allow Proxy1
> visible_hostname Proxy2
>



Sunil, i'm glad it helped you :)

On 6/5/07, Sunil K.P. <[hidden email]> wrote:
> Greetings,
>
> Thanks a lot.
> I was having problems with the sibling hits and it got solved.
>
> Regards
> Sunil


Cheers!
Santiago
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

Henrik Nordström
tis 2007-06-05 klockan 18:18 -0300 skrev Santiago del Castillo:

> Nothing :(
>
> I'm using version 2.5.STABLE14
> I've checked cache.log, nothing appears :(
>
> nothing comes into my mind! I used tethereal to see if the switch or
> some kind of firewall were filtering packets, but it's not the case :(,
> packets stop being sent by squids :(
>
> I'm about to start crying! :(
Before crying I would recomment you try upgrading to a supported Squid
version. Current supported version is 2.6.STABLE13. If you see the same
problem there then you are very welcome to file a bug report.

Regards
Henrik

signature.asc (316 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Sibling squids

bishal@baayu.com.np
In reply to this post by Juraj Sakala

I have squid 2.6.Stable 13 installed on two transparent proxy servers.

configured as a sibling working fine  with this configuration:





>Proxy1:

>icp_port 3130

>icp_hit_stale off

>cache_peer proxy2 sibling 3128  3130  no-netdb-exchange proxy-only no-digest

>no-delay

>log_icp_queries off

>icp_query_timeout 500

>http_access allow Proxy2

>icp_access allow Proxy2

>visible_hostname Proxy1

>

>Proxy2:

>icp_port 3130

>icp_hit_stale off

>cache_peer proxy1 sibling 3128  3130  no-netdb-exchange proxy-only no-digest

>no-delay

>log_icp_queries off

>icp_query_timeout 500

>http_access allow Proxy1

>icp_access allow Proxy1

>visible_hostname Proxy2

>





Best regards





On 6/5/2007, "Juraj Sakala" <[hidden email]> wrote:



>> Added that line and didn't help :(.

>>

>> This is what happens:

>>

>> 1) Squids were configured without sibling.

>> 2) Configured sibling on each squid as showed before (4 cache_peer

>> lines per squid, total 5 squids).

>> 3) Reloaded (not restarted) squid. Sibling started working.... After a

>> while (~20 secs). Stopped working.

>> 4) Changed some settings (disable siblings, reloaded, enabled

>> siblings, reloaded) and no ICP requests were sent.

>> 5) Restarted Squid and sibling started working again for ~20 secs again.

>>

>> So every change I make I have to restart squid :(

>>

>> About if I see SIBLING_HITs on my access.log, yes, for those 20 secs

>> sibling works. I see SIBLING_HITs :(

>

>It is strange problem. I use ICP without problems. Which version of squid do

>you use?

>Do you have checked cache.log?

>

>This is part of my working config, perhaps it will be helpful for you:

>

>Proxy1:

>icp_port 3130

>icp_hit_stale off

>cache_peer proxy2 sibling 3128  3130  no-netdb-exchange proxy-only no-digest

>no-delay

>log_icp_queries off

>icp_query_timeout 500

>http_access allow Proxy2

>icp_access allow Proxy2

>visible_hostname Proxy1

>

>Proxy2:

>icp_port 3130

>icp_hit_stale off

>cache_peer proxy1 sibling 3128  3130  no-netdb-exchange proxy-only no-digest

>no-delay

>log_icp_queries off

>icp_query_timeout 500

>http_access allow Proxy1

>icp_access allow Proxy1

>visible_hostname Proxy2

>

>