[squid-users] load balancer as squid
squid3 at treenet.co.nz
Sat May 7 03:19:33 UTC 2016
On 7/05/2016 1:33 p.m., deepa ganu wrote:
> I have been using squid as a reverse proxy
> http_port 80 accel defaultsite=22.214.171.124 vhost
> cache_peer 172.20.36.162 parent 80 0 proxy-only no-query no-digest
> originserver name=server1
> cache_peer 172.20.36.41 parent 80 0 proxy-only no-query no-digest
> originserver name=server2
> acl sites_server1 dstdomain 172.20.36.162
> acl sites_server2 dstdomain 172.20.36.41
> cache_peer_access server1 allow sites_server1
> cache_peer_access server2 allow sites_server2
> #cache_peer 172.20.36.41 parent 80 0 proxy-only name=telescope
> #cache_peer 172.20.36.41 parent 80 0 proxy-only name=portal
> http_access allow sites_server1
> http_access allow sites_server2
> Please let me know if this is correct, also how can I use it as a load
> balancer , if my one more server is at 172.20.36.42 ?
Squid load balances between cache_peer by default.
Right now it is using virtual host details (dstdomain ACL) in
cache_peer_access to explicitly route to the specific originserver
instead of LB.
If you can describe clearly in words the details of exactly what you
want Squid to do that should turn out to be what you need to configure.
More information about the squid-users