[squid-users] Proper Cache Peer Access

Amos Jeffries squid3 at treenet.co.nz
Wed Dec 14 01:33:45 UTC 2016


On 14/12/2016 2:10 p.m., creditu wrote:
> Looking for the best way to provide cache peer access for two urls on a
> 3.1 accelerator.  For example if a set of backend servers fullfill
> requests for both www.example.com and www-legacy.example.com is the
> following the correct way to handle them in regards to the cach peer
> access? 
> 

What you have works and is fine for simple setups like yours.

However, since you ask for "proper" ...

<snip>
> 
> # Backend servers for www and www-legacy
> acl www dstdomain www.example.com
> acl www-legacy dstdomain www-legacy.example.com

Recommended practice when you have same-type data and ACLs used in
identical ways like these ones. Is to place both those domain values in
the one ACL named 'www'. That will simplify your access lines.

There are some tiny memory and (cumulative) speed gains. But the biggest
reason is easier understanding and maintenance of the config if/when it
gets more complex.

Amos



More information about the squid-users mailing list