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