Time for action – configuring Squid to switch peer relationship
For example, let's say we have configured sibling.example.com
as a sibling proxy server but sibling.example.com
allows us to forward requests to .edu
domains, even if there are cache misses. So, we can have the following configuration:
cache_peer parent.example.com parent 3128 3130 default proxy-only cache_peer sibling.example.com sibling 3128 3130 proxy-only neighbor_type_domain sibling.example.com parent .edu
In accordance with the previous configuration, we can fetch cache misses for .edu
domains using sibling.example.com
.
What just happened?
In this section, we learned to switch the peer relationship, from sibling to parent, dynamically for certain domains.
Controlling request redirects
We have just seen a list of directives, using which, we can use different peers to forward requests based on various parameters. In addition to the previously mentioned directives, Squid provides a few more directives, using which we can force...