Pieter De Wit wrote:
Hello Everyone,

Although I haven't reached the stage yet of needing the following
feature I thought I might as well start talking about it soon. I would
like to suggest (if there isn't already a way of doing this) the
following idea for Squid:


I'm not certain of the exact behaviour in squid 2.6. BUt what I say below is derived directly from experience in the codebase of 3.0 in places that should not have change much.

Adjusting a Parent Cache's weight based on acl - What this means is the
following:

I have a main proxy server called (let's say) main_proxy. I have two
sibling proxy servers called child1_proxy and child2_proxy. Child1 and 2
proxies both have there own internet link of different sizes (the one is
adsl and the other one a E1). Now to balance requests between them is
simple, just add them with the same weight.

This is default on weighted-peer algorithms. To pre-balance the weight=N option is available on cache_peer config options.

To use one for a set of
users etc is simple. What I would like to do is dynamically control the
weight of each cache, based on acl's

This is done directly allow.deny to any given peer via ACLs already, and indirectly via sucessfull data accounting which modifies the weighting.


Let's say Client A is an exec and needs high speed caching, I want some
requests to go over the adsl and some over the E1. Now I would like to
do this during some time or something else...all do'able with the
current acl's, but what if I want to change the proxy based on
system/network load or some external factor,

For system-load balancing use --enable-icmp and install the pinger "make install-pinger".

or I want to say something
like, when Client A requests it from username "user" and from IP a.b.c.d
(say a dial up) then decrease the weight of the adsl proxy.

This is already implemented in all weighted-peering algorithms in squid.

cache_peer_access allows/prevents any data being retrieved from a peer. Each time data is successfully retrieved it adds to the weighting of the useful source peer.


I hope this is making sense, since I feel like i havn't really carried
over the idea "correctly".

I hope I have understood you correctly and have been helpful.

Happy holidays.

Amos

Reply via email to