[squid-users] Cache Hierarchy Help

From: Bryn Hughes <linux@dont-contact.us>
Date: Sat, 28 Oct 2006 20:39:50 -0700

I'm having a little trouble figuring out how to configure a squid-
cache hierarchy with CacheFu...

We currently have a smallish squid box on a VPS. There is not enough
room on the VPS for anything but Apache and Squid but it does have a
very fast internet connection and a high monthly bandwidth
allotment. Back here in the office we have our various Zope
servers. I have CacheFu set up on my Plone instances and we are
currently having quite good success with this combination except when
our internet link gets congested - most pages are served directly
from squid on the VPS giving very good speed due to its high
bandwidth. If someone requests something that isn't viewed much they
have to wait a little bit longer to get it but for the majority of
hits everything comes from the cache.

I have just added a second internet connection here at the office.
Still not a lot of upstream bandwidth though. Since hardware here is
cheap what I want to do is set up a pair of Squid caches in the
office which would be siblings of eachother and parents to the VPS,
one cache on each internet connection. That way requests coming in
to the VPS should go to whichever internet link can respond the
fastest back here in the office plus provide failover if a link goes
down.

It seems I can do this without TOO much trouble but I can't quite
figure out what I'm supposed to be doing with the squid config. I
THINK it should be something like this:

VPS:
cache_peer 1.1.1.1 parent 3128 3130
cache_peer 2.2.2.2 parent 3128 3130

Connection 1:
cache_peer 2.2.2.2 sibling 3128 3130

Connection 2:
cache_peer 1.1.1.1 sibling 3128 3130

What I don't get is the cache_peer_access stuff. The only thing that
should be accessing either 'back end' squid is the VPS. From the
example config it's not entirely clear what I should be setting here.

The other thing I'm a bit confused about is how rewrite rules should
work in this scenario. Should all 3 squid boxes have the same
rewrite rules? I don't think I want the VPS trying to connect
directly to the back-end servers without going through the cache
hierarchy.

Bryn

--
~
~
:wq
Received on Sat Oct 28 2006 - 21:40:26 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:05 MST