Sylvain Viart wrote:
Hi,
To sum up:
* proxy squid 2.6.STABLE16
* accelerator, squid only speak to apache2 (originserver), no other
proxy speaking together.
* I want to weight loadblance the squid query to the parent (origin)
* + I want to filter the url in 2 type static and php. static
o URL are directed to the static peer, not balanced
o any php content URL are directed to php peer with weighted
round-robin selection.
squid behavior seems to be bugged when I put :
cache_peer php-01 parent 80 0 no-query originserver round-robin
weight=2 login=PASS
#cache_peer php-02 parent 80 0 no-query originserver round-robin
weight=0 login=PASS
cache_peer php-03 parent 80 0 no-query originserver round-robin
weight=2 login=PASS
cache_peer php-04 parent 80 0 no-query originserver round-robin
weight=1 login=PASS
cache_peer php-05 parent 80 0 no-query originserver round-robin
weight=2 login=PASS
cache_peer php-06 parent 80 0 no-query originserver round-robin
weight=2 login=PASS
cache_peer php-07 parent 80 0 no-query originserver round-robin
weight=3 login=PASS
cache_peer php-08 parent 80 0 no-query originserver round-robin
weight=2 login=PASS
weight are not respected and all the load seems to "fall" on the last
declared peer.
SNIP
I tested the CARP config and squid complain about the conf syntax:
cache_peer php-01 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.062500
The 2.6 STABLE 16 changed the cache_peer CARP directive. See
http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE16-RELEASENOTES.html#s2
and http://www.squid-cache.org/Versions/v2/2.6/cfgman/cache_peer.html
carp_load_factor has been done away with, and now it seems you would
just replace "round-robin" in your config above with "carp".
cache_peer php-03 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.062500
cache_peer php-04 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.062500
cache_peer php-05 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.062500
cache_peer php-06 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.062500
cache_peer php-07 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.187500
cache_peer php-08 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.062500
cache_peer php-09 parent 80 0 no-query no-digest originserver
login=PASS carp-load-factor=0.437500
squid -k parse
2007/11/06 16:08:36| parse_peer: token='carp-load-factor=.062500'
FATAL: Bungled squid.conf line 592: cache_peer varan-01 parent 80 0
no-query no-digest originserver login=PASS carp-load-factor=.062500
Squid Cache: Version 2.6.STABLE16
configure options: '--prefix=/usr' '--exec_prefix=/usr'
'--bindir=/usr/sbin' '--sbindir=/usr/sbin'
'--libexecdir=/usr/lib/squid' '--sysconfdir=/etc/squid'
'--localstatedir=/var/spool/squid' '--datadir=/usr/share/squid'
'--enable-async-io' '--with-pthreads'
'--enable-storeio=ufs,aufs,coss,diskd,null' '--enable-linux-netfilter'
'--enable-arp-acl' '--enable-epoll'
'--enable-removal-policies=lru,heap' '--enable-snmp'
'--enable-delay-pools' '--enable-htcp' '--enable-cache-digests'
'--enable-underscores' '--enable-referer-log' '--enable-useragent-log'
'--enable-auth=basic,digest,ntlm' '--enable-carp'
'--enable-follow-x-forwarded-for' '--with-large-files'
'--with-maxfd=65536' 'i386-debian-linux'
'build_alias=i386-debian-linux' 'host_alias=i386-debian-linux'
'target_alias=i386-debian-linux'
carp seems to be enabled...
Regards,
Sylvain.
Chris