[squid-users] Delay pool not limiting each connection
squid3 at treenet.co.nz
Mon Sep 17 15:02:10 UTC 2018
On 18/09/18 1:15 AM, Sekar Duraisamy wrote:
> Hello All,
> I have tried to limit the bandwidth for each requests with 5Mbps speed
> with below.
> delay_pools 1
> delay_class 1 2
> delay_access 1 allow all
> delay_parameters 1 625000/625000 625000/625000
> But it is limiting total bandwidth of the squid only 625000 and not
> allowing the same bandwdith for each and every requests coming through
Yes. That behaviour is exactly what you configured above.
delay_parameters 1 aggregate individual
The "aggregate" is total bandwidth to be shared between individual
clients with each getting up to (but not exceeding) however much is
By configuring aggregate and individual as exactly the same values you
have defined that any one client _could_ use the entire 625000 Bytes/sec
available. A second client only gets what that first one leaves unused.
A third only what those two leave unused, etc.
... which is exactly the "class 1" behaviour despite using a class 2
pool to do it.
To use a per-client limit, use a class 2 pools with an aggregate limit
Also, no delay pool limits per-request. They are per-network,
per-subnet, per-client, per-user, or per-tag.
The closest you will get to a per-request limit is to have an
external_acl_type helper tag each request with a unique "tag="
identifier and use a class 5 pool.
However, please be aware that most traffic these days in HTTP/1.1 is
actually revalidation which only takes up a few hundred bytes, rarely
even a KB per-request. So having a Mbps per-request allocation is
pointless extra calculation and checking for a huge amount of requests.
More information about the squid-users