[squid-users] Squid 3.3.12, Multiple process, requests serviced by process.
Amos Jeffries
squid3 at treenet.co.nz
Wed Nov 12 03:16:37 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/11/2014 9:28 a.m., Oleg Chomenko wrote:
> Hello,
>
> We use a squid cache for our robots to collects an information
> from client's web sites.
>
> The squid running on FreeBSD 9.3 , squid version 3.3.13
>
> the configuration is like this:
>
> if ${process_number} = 1 http_port 3001 cache_peer 1.1.1.1 parent
> 4567 0 no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 cache_peer 1.1.1.2 parent 4567 0 no-query
> no-digest no-netdb-exchange round-robin connect-fail-limit=3
> cache_peer 1.1.1.3 parent 4567 0 no-query no-digest
> no-netdb-exchange round-robin connect-fail-limit=3 cache_peer
> 1.1.1.4 parent 4567 0 no-query no-digest no-netdb-exchange
> round-robin connect-fail-limit=3 cache_peer 1.1.1.5 parent 4567 0
> no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 endif
>
> if ${process_number} = 2 http_port 3001 cache_peer 1.1.1.1 parent
> 4567 0 no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 cache_peer 1.1.1.2 parent 4567 0 no-query
> no-digest no-netdb-exchange round-robin connect-fail-limit=3
> cache_peer 1.1.1.3 parent 4567 0 no-query no-digest
> no-netdb-exchange round-robin connect-fail-limit=3 cache_peer
> 1.1.1.4 parent 4567 0 no-query no-digest no-netdb-exchange
> round-robin connect-fail-limit=3 cache_peer 1.1.1.5 parent 4567 0
> no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 endif
>
>
> if ${process_number} = 3 http_port 3002 cache_peer 1.1.2.1 parent
> 4567 0 no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 cache_peer 1.1.2.2 parent 4567 0 no-query
> no-digest no-netdb-exchange round-robin connect-fail-limit=3
> cache_peer 1.1.2.3 parent 4567 0 no-query no-digest
> no-netdb-exchange round-robin connect-fail-limit=3 cache_peer
> 1.1.2.4 parent 4567 0 no-query no-digest no-netdb-exchange
> round-robin connect-fail-limit=3 cache_peer 1.1.2.5 parent 4567 0
> no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 endif
>
> if ${process_number} = 4 http_port 3002 cache_peer 1.1.2.1 parent
> 4567 0 no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 cache_peer 1.1.2.2 parent 4567 0 no-query
> no-digest no-netdb-exchange round-robin connect-fail-limit=3
> cache_peer 1.1.2.3 parent 4567 0 no-query no-digest
> no-netdb-exchange round-robin connect-fail-limit=3 cache_peer
> 1.1.2.4 parent 4567 0 no-query no-digest no-netdb-exchange
> round-robin connect-fail-limit=3 cache_peer 1.1.2.5 parent 4567 0
> no-query no-digest no-netdb-exchange round-robin
> connect-fail-limit=3 endif
>
> ..... # COORDINATOR if ${process_number} = 16 http_port 3099 endif
>
> workers 15
>
>
> in total 15+1 processes is running, traffic load over 100 Mbit;
> around 50K req/min (total #)
>
> Problem is: when we restart the squid all request to port 3001 do
> serve only upstream proxy defined for this process. after couple
> hours, we see request served by upstream cache NOT belonged to this
> 3001 ports. ( like in example above can served by 1.1.2.4)
>
> The rate depend on the load, up to 15% all requests can be served
> by others upstream proxy NOT belonged to this port we use a java
> application and our website to logging all requests we generating
> and passing trough the cache server.
Are these 15% HITs ?
Do you have shared memory cache enabled ?
If a worker 1 transaction through cache_peer 1.1.1.4 gets cached and
shared between workers its response might be re-used by worker 3 or 4
when they get the same URL requested.
or, are they actually reaching those backend cache_peer servers from a
worker ?
>
> This behavior is a serious trouble for us .....
>
> Thanks in advance for any tips to solve it (Thinking it an
> internal request distribution mechanism produce a fault )
>
If you need the shared caching, but to have it split between worker
1&2 and 3&4 then you will want to look at the named services feature
in Squid-3.5.
http://www.squid-cache.org/Versions/v3/3.5/RELEASENOTES.html#ss2.3
Amos
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
iQEcBAEBAgAGBQJUYtEVAAoJELJo5wb/XPRjr40H/30boJ5IM/w/vtezpIbR+kv1
B5ae+vPyAwEa5a53Q6yRxgoK+qQ7sZWi6bsCtpjyimSMuzp4HVwrZ+ebz1GTZdKb
47Uyeu9IfTu0xB2cZi8usNB/cLfox15pk48gZJqoB3Vzav749PVvm/Y1gR0IunEO
MuqRLr4DkUMBROHwKNIfZLHTG6wfNtMT/hwFgZt5dX37J3PAh4Z+ev0kAt0nx3eY
kgS09lHyrsiQkrsaVgqppNqbM2yEA5h69wddYYP/gjpFd0fJl7wJfsilvyj8oo4L
jkvSux5JV/kJNKBnQLpMdnrJTW1LJPwZH0DPdaOkFSmGkhm/rYifqJzabnTxDRg=
=Idr+
-----END PGP SIGNATURE-----
More information about the squid-users
mailing list