Date: Wed, 24 Mar 2010 18:06:46 +1300
From: squid3@xxxxxxxxxxxxx
To: squid-users@xxxxxxxxxxxxxxx
Subject: Re: Peering squid multiple instances.
GIGO . wrote:
I have successfully setup running of multiple instances of squid for the sake of surviving a Cache directory failure. However I still have few confusions regarding peering multiple instances of squid. Please guide me in this respect.
In my setup i percept that my second instance is doing caching on behalf of requests send to Instance 1? Am i correct.
You are right in your understanding of what you have configured. I've
some suggestions below on a better topology though.
what protocol to select for peers in this scenario? what is the recommendation? (carp, digest, or icp/htcp)
Under your current config there is no selection, ALL requests go through
both peers.
Client -> Squid1 -> Squid2 -> WebServer
or
Client -> Squid2 -> WebServer
thus Squid2 and WebServer are both bottleneck points.
If syntax of my cache_peer directive is correct or local loop back address should not be used this way?
Syntax is correct.
Use of localhost does not matter. It's a useful choice for providing
some security and extra speed to the inter-proxy traffic.
what is the recommended protocol for peering squids with each other?
Does not matter to your existing config. By reason of the "parent"
selection.
what is the recommended protocl for peering squid with ISA Server.
"parent" is the peering method for origin web servers. With
"originserver" selection method.
Instance 1:
visible_hostname vSquidlhr
unique_hostname vSquidMain
pid_filename /var/run/squid3main.pid
http_port 8080
icp_port 0
snmp_port 3161
access_log /var/logs/access.log
cache_log /var/logs/cache.log
cache_peer 127.0.0.1 parent 3128 0 default no-digest no-query proxy-only no-delay
prefer_direct off
cache_dir aufs /var/spool/squid3 100 256 16
coredump_dir /var/spool/squid3
cache deny all
Instance 2:
visible_hostname SquidProxylhr
unique_hostname squidcacheprocess
pid_filename /var/run/squid3cache.pid
http_port 3128
icp_port 0
snmp_port 7172
access_log /var/logs/access2.log
cache_log /var/logs/cache2.log
coredump_dir /cache01/var/spool/squid3
cache_dir aufs /cache01/var/spool/squid3 50000 48 768
cache_swap_low 75
cache_mem 1000 MB
range_offset_limit -1
maximum_object_size 4096 MB
minimum_object_size 12 bytes
quick_abort_min -1