[squid-users] delay pools question
squid3 at treenet.co.nz
Mon Oct 26 02:01:08 UTC 2015
On 26/10/2015 12:48 p.m., Alex Samad wrote:
> I have had a look at http://wiki.squid-cache.org/Features/DelayPools
> Wondering if somebody can maybe explain how it rate limits downloads.
Quite simple. Each request transaction gets assigned into some pool(s)
based on your delay_parameters and delay_access settings.
Each time a read(2) from the server connection is requested the pools
are checked to see what size is permitted, and the smaller of the
permitted size or the wanted size is read in.
> So I can understand it would be able to limit proxy to client traffic
> as squid is the sender and can limit how it sends.
To limit client traffic use client_delay_* pools settings. They operate
the same but for reading on the client connection.
Note that simply trottling read(2) operations is not great. It ignores
all the TCP level transactions, and bandwidth from other protocols
outside HTTP, and even some parts for HTTP traffic done before a pool is
assigned (ie the HTTP headers on some requests). It is far better to use
the available OS level QoS functionality for bandwidth control.
More information about the squid-users