On 07/12/10 04:30, Jack Falworth wrote:
Hi,
I have a big-sized server for caching purposes only (quad-core cpu, a
lot of RAM and HDD storage). Since squid cannot use multiple cpus, my
box is very limited in the amount of requests that can be processed.
In order to improve that I run multiple squids on the box (e.g. 4
squid processes). The requests are distributed to all squids in a
round-robin manner.
Now I have the problem of cache duplicates. In order to solve this I
want to use sibling cache peers along with cache-digests. The problem
is that I cannot setup multiple cache peers with the same address
(here 127.0.0.1) and different ports. In the book squid - the
definitive guide I found the following line: "Neighbor hostnames must
be unique: you can't have two neighbors with the same name, even if
they have different ports."
As it is clear to not use the same hostname more than once, I don't
get the point why it should(resp. is) not possible to set up multiple
siblings on 127.0.0.1 with different ports?
To prevent forwarding loops:
sibling A passes a request to sibling A which passes the result to
sibling A for service.
As opposed to:
sibling A passes a request to sibling B which passes the result to
sibling A for service.
Squid provides visible_hostname for public message to the visitors along
with unique_hostname for internal use to identify the specific instance.
Is there any reason for this restriction? Or is there a different
solution for my problem?
Yes and yes.
CARP configurations are more efficient on cachgin than digest, with only
a small penalty by adding a possible bottlneck at the CARP gateway instance.
These setups are two-tiered with a parent using "carp" selection to
load balance between a layer of siblings.
A more extreme config which round-robins the TCP port to multiple
parents or multiple ports on one parent:
http://wiki.squid-cache.org/ConfigExamples/ExtremeCarpFrontend
You may also want to play with 3.2 beta releases to see if the SMP works
for you or need improvement. We know it does not (yet) do cache
duplicate reduction.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.9
Beta testers wanted for 3.2.0.3