Search squid archive

Re: Acl + Delay Pool based on Size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> On 30/07/2007 at 12:38, Kris <christian@xxxxxxxxx> wrote:
> Dear,
> 
> is it possible ? ex : i want to set a delay pool for limit the bw if 
> someone download file bigger than 20Mb. and if lower than 20Mb it`ll be 
> no delay pool. i know how to use delay pool but i dont know how to set 
> ACL to lock the max size >.<  any clue 

It can't be done *reliably*, because the only sure way to know a file
is over 20Mb is when you've already received the first 20Mb and more
data arrives! (Much like a phone call: you can't tell how long it is until
it's over.)

The  server *can* include a Content-Length which will tell you how
big the file is - or it can just start sending data and close the connection
once the whole thing has been transferred, at which point you have
no idea how much more data will be sent until you've actually got it!

You should be able to set an ACL which will match the Content-Length
sent by the server, *if* there is one - but that isn't guaranteed.


You should, however, be able to achieve the results you seem to be
seeking by using a 20Mb 'burst' in the delay pool: a 15Mb download
will not be affected, but a series of 10Mb downloads by a single user
will be.

Downside: a 30Mb download will start off quickly, then drop to your
throttled rate two-thirds of the way through, which isn't quite what
I think you were asking for; upside, it'll work fairly reliably, including
stopping download managers getting around your throttling by
requesting big files in chunks of 10Mb each.


James.



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux