Re: [squid-users] Re: how set quota and rate limit for specific ips in squid ??

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 13 May 2013 12:02:56 +1200

On 12/05/2013 7:55 p.m., Ahmad wrote:
> hi ,
>
> i want to ask about SDquota

Quite old and seems to be designed to work with Squid-2.5 or so. Parsing
log files and calculating bandwidth usages per-user after a delay.
You would get the better results using the Squid-3.2+ database log
daemon helper to record traffic in realtie to a database. Then your auth
system checking whether a user is past their total allocation to
allow/reject login on each request.

All of these type of "quota controls" suffer the same problems:
1) traffic is only recorded to Squid access.log *after* the transaction
has completed and traffic size is known.
2) some transactions can last for days.
3) there is nothing to prevent a user allocated to fetch 1MB per day
fetching thousands of DVD images. They will only be blocked for *new*
requests after the frist DVD image finishes and they magically go
over-quota by some huge amount.

> or any other thirdparty
>
> can it be integrated with squid ??

Like I said already, Squid can emit TOS values on packets. Any other
software which controls packets based on their TOS values can play with
the TOS values you sent by Squid far better than any of the systems
plugged into Squid or Squids logging mechanisms.

In recent years there has been quite a large industry of QoS software
developed. It would be well worth your time looking at that for a total
solution instead of isolating yourself to Squid-specific tools. IIRC
Andrew Beverley investigated this quite extensively last year and has
some great information on setting bandwidth controls up using Squid and TOS.

Amos
Received on Mon May 13 2013 - 00:03:01 MDT

This archive was generated by hypermail 2.2.0 : Mon May 13 2013 - 12:00:05 MDT