[squid-users] setting up cache peering
Alex Samad
alex at samad.com.au
Wed Dec 2 05:50:45 UTC 2015
Hi
I recently moved to squid-3.5.11-1.el6.x86_64 on centos 6.7.
from the centos 3.1 i think ?
This what I had originall
#cache_peer gsdmz1.xy.com sibling 3128 3130 proxy-only
#cache_peer alcdmz1.xy.com sibling 3128 3130 proxy-only
I had a shared config between the 2 server gsdmz1 and alcdmz1. I would
uncomment 1 or the other depending.
during my upgrade I coped the gsdmz1 squid config over to alcdmz1 but
forgot to uncomment the
cache_peer alcdmz1.xy.com sibling 3128 3130 proxy-only
so alcdmz1 was talking to itself at times.
using this as my test
wget -d http://www.smh.com.au/business/markets-live/markets-live-investors-take-stock-20151201-gld1lu.html
-O /dev/null
and setting http_proxy to either alc or gsdmz1 I would get a 504 error.
wget -d http://www.smh.com.au/business/markets-live/markets-live-investors-take-stock-20151201-gld1lu.html
-O /dev/null
Setting --output-document (outputdocument) to /dev/null
DEBUG output created by Wget 1.12 on linux-gnu.
--2015-12-02 16:35:34--
http://www.smh.com.au/business/markets-live/markets-live-investors-take-stock-20151201-gld1lu.html
Resolving alcdmz1... 10.3.2.111
Caching alcdmz1 => 10.3.2.111
Connecting to alcdmz1|10.3.2.111|:3128... connected.
Created socket 4.
Releasing 0x0000000001ea5db0 (new refcount 1).
---request begin---
GET http://www.smh.com.au/business/markets-live/markets-live-investors-take-stock-20151201-gld1lu.html
HTTP/1.0
User-Agent: Wget/1.12 (linux-gnu)
Accept: */*
Host: www.smh.com.au
---request end---
Proxy request sent, awaiting response...
---response begin---
HTTP/1.1 504 Gateway Timeout
Server: squid
Mime-Version: 1.0
Date: Wed, 02 Dec 2015 05:35:34 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 4063
X-Squid-Error: ERR_ONLY_IF_CACHED_MISS 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from gsdmz1
X-Cache-Lookup: MISS from gsdmz1:3128
X-Cache: MISS from alcdmz1
X-Cache-Lookup: MISS from alcdmz1:3128
Via: 1.1 gsdmz1 (squid), 1.1 alcdmz1 (squid)
Connection: close
---response end---
504 Gateway Timeout
Closed fd 4
2015-12-02 16:35:34 ERROR 504: Gateway Timeout.
I changed the line to be
cache_peer gsdmz1.xy.com sibling 3128 3130 proxy-only standby=50
on the alcdmz1 box
and
cache_peer alcdmz1.xy.com sibling 3128 3130 proxy-only standby=50
on the gsdmz1 box
but this still gave me 504 errors ?
I tried to force a new version through both proxies by using wget with
no-cache option. But that didn't help.
So what went wrong, how can I flush out the stale 504.
What is the best way to setup the 2 proxies to talk to each other
before going out to the internet.
the proxies run on a pacemaker cluster. I have 2 vip's setup as the
proxy addresses, in normal conditions these address are setup 1 on
each server. whilst working on a server I can move the vip and not
affect any one.
But I would like to take benefit of each others cache, whats the best
setup for cache_peer in this setup.
Neither server is closer to the internet.
thanks
A
More information about the squid-users
mailing list