Re: [squid-users] Adjusting Parent Cache weight based on acl

2007-12-16 Thread Amos Jeffries
> Hi Amos,
>
> Thanks for the reply, so it seems that squid already does what I need
> (in a way). Would you mind expanding on the data accounting comment, All
> I could find on google was "ip accounting" in squid. Like I said, the
> servers arn't ready yet so I can't test what I need to, but so far it's
> looking good :)

It's a bit messy, hooking into the ICMP stats in places. But each time
squid receives an HTCP or ICP reply it counts as one ping. It looks to me
like it was intended for the up/down peer detection, but it has the
side-effect of falling nicely into the rtt calculation as a super-fast
ping, which then falls over to ever so slightly reduce the weight
calculation for that peer.

Amos

>
> Thanks,
>
> Pieter
>
> Amos Jeffries wrote:
>>
>> This is done directly allow.deny to any given peer via ACLs already,
>> and indirectly via sucessfull data accounting which modifies the
>> weighting.
>>> 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.
>>
>
>




Re: [squid-users] Adjusting Parent Cache weight based on acl

2007-12-14 Thread Pieter De Wit
Hi Amos,

Thanks for the reply, so it seems that squid already does what I need
(in a way). Would you mind expanding on the data accounting comment, All
I could find on google was "ip accounting" in squid. Like I said, the
servers arn't ready yet so I can't test what I need to, but so far it's
looking good :)

Thanks,

Pieter

Amos Jeffries wrote:
>
> This is done directly allow.deny to any given peer via ACLs already,
> and indirectly via sucessfull data accounting which modifies the
> weighting.
>> 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.
>



Re: [squid-users] Adjusting Parent Cache weight based on acl

2007-12-14 Thread Amos Jeffries

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



[squid-users] Adjusting Parent Cache weight based on acl

2007-12-13 Thread Pieter De Wit
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:

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. 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

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, 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.

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

Thanks,

Pieter De Wit