Re: [squid-users] reply_body_max_size + delay_pools

From: Chris Robertson <crobertson_at_gci.net>
Date: Tue, 08 Jul 2008 10:36:01 -0800

Heinrich Harrer wrote:
> HI,
>
> Is it possible to create an ACL to use with delay_pools to limit
> bandwidth using reply_body_max_size?
>
> Ex.
> reply_body_max_size 10485760 allow all
>
> This only deny an download higher than the limit. I Want to slow down
> the connection (if the object is not in the cache), not deny.
>
> Any suggestion?
>
> Squid version is 2.7x.
>

Just use delay pools, and set the initial bucket size to the max object
size you don't want to limit. This will have the added benefit of
preventing someone from circumventing your reply_body_max_size slowdown
by grabbing lots of little bits of a large file.

delay pools 1
delay_class 1 2
delay_access 1 allow all
delay_parameters 1 -1/-1 1048576/32000 # The first MByte of non-cached
traffic is delay free, and the bucket refills at 256kbps.

Chris
Received on Tue Jul 08 2008 - 18:36:08 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 11 2008 - 12:00:03 MDT