On 15/05/2014 12:28 a.m., Mr Clown wrote: > Hi folks, > > I am working on version 3 of squid, and I am trying to "order" the sibling > peers with a selection algorithm and/or the "weight" option in the > "cache_peer" directive. By definition all siblings are equivalent including the one you are configuring. see the diagrams at http://wiki.squid-cache.org/Features/CacheHierarchy > > However, I can't get it to work. I've understood the selection algorithms > "round-robin", 'weighted-round-robin', 'carp' (and so forth) are only used > with parent peers, not siblings. Hence I've tried to make use of the > "weight" option, as follow: > /cache_peer cat 3128 3130 proxy-only weight=100 > cache_peer dog 3128 3130 proxy-only weight=1/ > NP: You are missing the "sibling" type field on those config lines. > But in the access.log, I am not seeing any load-balancing mechanism. The > request'responses alternatively comes from both peers; nothing seems to be > related to the 'weight' option I've put in the configuration file. As documented weight= is a parameters for certain parent selection algorithms. It is used to balance load between alternative upstream sources (parents). Siblings are not upstream sources. > > Any idea what should I use ? ICP, HTCP or cache digests operate between siblings. Every request which can potentially be served faster from a sibling (has a digest entry indicating it exists there) has an ICP or HTCP request sent to it. Only the siblings with a useful object respond and the *fastest responding sibling* is used. Anything else will only slow down the traffic response. The closes siblings get to ordering is the sequence of cache_peer directives in squid.conf. That is the order sibling probes are performed. The results as mentioned depends on what responses come back. Load balancing is also by definition something that happens in a front-end to decide amongst various caches which to *it* are parents. > Have you ever tried to perform load-balancing with sibling peers ? If so, > could you help me with my problem here ? If you have so much traffic going to siblings that you need something like load balancing between them something is seriously wrong in your network design. Note that every request which gets shunted "sideways" to a sibling is a request which should have been directed there by the frontend load balancer to begin with. If you are missing a frontend load balancer, that is the problem. Amos