Time for action – adding backend web servers
We learned about cache_peer
in detail in the previous chapter and previously, we saw two options specifically meant for Squid in reverse proxy mode. Now, let's see a few examples showing the usage of the cache_peer
directive to add backend web servers.
cache_peer 127.0.0.1 parent 80 0 no-query no-digest originserver cache_peer local_ip_of_web_server parent 80 no-query originserver forcedomain=www.example.com
What just happened?
We learned to add backend web servers in our Squid configuration file as cache peers or neighbors so that Squid can forward them the requests which it receives from clients.
Support for surrogate protocol
The requests and responses for a web document may pass through a series of server surrogates (reverse proxies or origin server accelerators) and forward caching proxies. While the server surrogates are used for scaling individual or a group of websites, the forward proxies are used to provide a better browsing experience...