In accelerator mode, you can use the same Squid instance with differents cache_peer configuration using acl to choose where requests will go:
acl example2 dstdomain www.example2.com cache_peer 172.16.1.1 parent 80 0 no-query originserver weight=1 name=clust1 cache_peer 172.16.1.2 parent 80 0 no-query originserver weight=1 name=clust2 cache_peer_access clust1 allow !example2 cache_peer_access clust2 allow example2<code>
Request for the domain www.example2.com go to clust2 (172.16.1.2). However, request for others domain, like www.toto.com go to clust1 (172.16.1.1).
0 Responses to “How to use differents cache_peer in Squid”