Let’s say we want to use the cache peer for browsing video portals like Youtube, Netflix, Metacafe, and so on. Adding a bang (!) as a prefix to the domain name will prevent the use of this cache peer for that particular domain. We can specify any number of domains which may be fetched through this cache peer. In the code, CACHE_PEER_HOSTNAME is the hostname or IP address of the cache peer being used when declaring it as a cache peer, using the cache_peer directive. The syntax of this directive is quite simple: cache_peer_domain CACHE_PEER_HOSTNAME DOMAIN1 DOMAIN2. The directive cache_peer_domain is a quick way to achieve the desired control. If we have added a few proxy servers as cache peers to our Squid server, we may have the desire to have a little bit of control over the requests being forwarded to the peers. Quickly restricting access to domains using peers There are several other options in which you can add cache peers, for various purposes, such as, a hierarchy. ![]() We also used the option proxy-only, which means the requests fetched using this cache peer will not be cached on our proxy server. We added as a cache peer or parent proxy to our Squid proxy server. This is helpful when we don’t want to replicate cached web documents, especially when the two peers are connected with a high bandwidth backbone. The option proxy-only specifies that the content fetched using this peer should not be cached locally. The option default specifies that this cache peer should be used as a last resort in the scenario where other peers can’t be contacted. This code will direct Squid to use as a proxy server to satisfy client requests in case it’s not able to do so itself. If the other proxy server is not using the standard ICP port, we should change the code accordingly. Let’s add a proxy server ( ) that will act as a parent proxy to our proxy server: cache_peer parent 3128 3130 default proxy-onlyģ130 is the standard ICP port. The other proxy servers can be used as a parent, sibling, or a member of a multicast group. TYPE specifies the type of the proxy server, which in turn, determines how that proxy server will be used by our proxy server. In this code, HOSTNAME_OR_IP_ADDRESS is the hostname or IP address of the target proxy server or cache peer. Let’s have a quick look at the syntax for this directive: cache_peer HOSTNAME_OR_IP_ADDRESS TYPE PROXY_PORT ICP_PORT ![]() ![]() The directive cache_peer is used to tell Squid about proxy servers in our neighborhood. Let’s have a brief look at the directives provided by Squid for communication among different cache peers. The proxy servers can use each other’s cache to retrieve the cached web documents locally to improve performance. We normally deploy more than one proxy server in the same network to share the load of a single server for better performance. Use it as a parent or sibling proxy server.Use it as a parent or sibling proxy server to satisfy its clients’ requests.Share its cache with to reduce bandwidth usage and access time.Cache peers or neighbors are the other proxy servers with which our Squid proxy server can:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |