[squid-users] It looks like I have carp working.

From: Rob Williams <rob.williams_at_gmail.com>
Date: Mon, 11 Aug 2008 16:25:24 -0700

I've had some success today trying out a new squid configuration using carp.

What I was trying to do before was use the PEN load balancer in
round-robin mode to send http requests to my two squid nodes, each of
which was configured to reference one another as nodes in the carp
array. This wasn't working properly. I would find forwarding loops or
both nodes would cache the same object defeating the purpose.

Supposedly squid can be setup that way, but I can't figure out how to
get it to work like that. So, what I am doing instead is more like
what this article appears to depict:
http://www.nedworks.org/~mark/presentations/san/Wikimedia%20architecture.pdf
and that is two layers of squid.

I've removed the PEN load balancer and now all of my requests will
come into a 'router squid' configured like so:

SQUID1:
http_port 80 accel vhost vport
cache_peer squid2.test.rob parent 80 0 carp weight=1 proxy-only
cache_peer squid3.test.rob parent 80 0 carp weight=1 proxy-only

Now, I will scale the 'caching squid' layer by adding more machines to
the list of cache peers in the router squid. The configuration for the
cache squids is as follows:

SQUID2:
http_port 80 accel vhost vport
cache_peer freebsd1.test.rob parent 80 0 originserver

SQUID3:
http_port 80 accel vhost vport
cache_peer freebsd1.test.rob parent 80 0 originserver

freebsd1 is my static content server which all squids are trying to
represent in my reverse proxy cluster. After testing access attempts
to multiple files I find that some files are always routed to squid2
and others are always routed to squid3. It appears carp is working
properly now.

The only problem I'm currently seeing is that my router squid checks
itself to see if it has any cached files before 'routing' the request
to the carp nodes:

X-Cache: MISS from squid1.test.rob
X-Cache-Lookup: MISS from squid1.test.rob:80

Since I want squid1 to simply use the carp protocol to determine which
child has the content instead of caching content itself, is there a
way I can tell squid1 to not look internally for cached files?

-Rob
Received on Mon Aug 11 2008 - 23:25:27 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 12 2008 - 12:00:03 MDT