Re: [squid-users] Squid delay pool question

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 04 Dec 2009 12:51:41 +1300

mikewest09 wrote:
> Hi all,
>
> I've installed Squid 3 on our server (connected to a 100 Mbps connection)
> which contains our website and Squid. Now what I hope to do in order to
> avoid having the bandwidth sucked by one user, is that limit the bandwidth
> usage under Squid so that at any given time a user can download/use a
> maximum of 15 MB with the speed 100 Mbps, after which the speed drop
> automatically for this specific user to 10 Mbps
>
> I've read that this can be done using delay pools, although after reading
> few articles I can't figure out till now which 'class' (i.e. 1 or 2 or 3) to
> apply for the delay pool I am going to setup and what will be the best way
> to write the delay pool rule in order to apply the above limitation

Close but not quite.
Squid can permit _unlimited_ speed for some initial amount of data, then
cap it lower. If your network is faster than 100MB Squid cannot limit
the initial fetch to 100MB.

>
> So can someone here please help me and show me how I can write the delay
> pool(s) necessary to apply the limitations mentioned above?

http://www.squid-cache.org/Doc/config/delay_parameters/

# One pool
delay_pools 1

# first pool of type 2 (individual IPv4 address buckets)
delay_class 1 2

# network aggregate. unlimited.
# individual IPs:
# first 15MB unlimited := 15728640 bytes.
# after which 10Mbps := 1310720 _bytes_ per second.
#
delay_parameters 1 -1/-1 15728640/1310720

# all traffic for everybody gets this restriction.
delay_access 1 allow all

>
> Another question, will the limitation I plan to do here using delay pools
> affect the normal bandwidth of our website?

Only if the traffic normally goes through Squid AND your delay_access
rules are written in a way that catches it.

Instead of "allow all" you could do this if you wanted:
   delay_access allow !localWebsite

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
   Current Beta Squid 3.1.0.15
Received on Thu Dec 03 2009 - 23:51:50 MST

This archive was generated by hypermail 2.2.0 : Fri Dec 04 2009 - 12:00:01 MST