Squid.conf's Cache_peer explanation

Source: Internet
Author: User

Configure the proxy server array with the Cache_peer option in the squid.conf configuration file, and other options to control how the proxy partner is selected. Cache_peer is used in the following format:

Cache_peer hostname type http_port icp_port option

A total of 5 options can be configured:
1) hostname: Refers to the requested sibling child proxy server or parent proxy server. Can be represented by host name or IP address;
2) Type: Indicates the type of hostname, whether it is a sibling child proxy server or a parent proxy server, that is, parent or sibling (child);
3) Http_port:hostname listening port;
4) Icp_port:hostname on the ICP listening port, for the ICP agreement is not supported can be specified 7;
5) Options: can contain one or more keywords.
Possible keywords for options are:
1) Proxy-only: Indicates that the data obtained from peer is not cached locally, by default, squid is to cache this part of the data;
2) Weight=n: For situations where you have multiple peers, and if more than one peer has the data you requested, squid determines the value of its weight by calculating the ICP response time for each peer. Squid then sends an ICP request to the peer with the largest weight. That is, the higher the weight value, the higher its priority. Of course you can also manually specify its weight value;
3) No-query: Do not send an ICP request to the peer. This option can be used if the peer is not available;
4) Default: a bit like the default route in the routing table, the peer will be used as a last resort. When you have only one parent proxy server and it does not support the ICP protocol, you can use the default and No-query options to send all requests to the parent proxy server;
5. Login=user:password: You can use this option to authenticate when your parent proxy server requires user authentication.

Note: Peer is a service that has the requested data and can be a parent server. can also be a sibling child server

Squid.conf's Cache_peer explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.