Re: [squid-users] Squid Traffic Accounting

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 25 Oct 2003 11:11:31 +0200 (CEST)

On Sat, 25 Oct 2003, oleg-s wrote:

> but we can't block big over quota downloads. say user trying to download
> iso image, at the time of request we *don't* know size of the object
> requested, if we want to block over quota downloads we *must* know it,
> but we don't.

Correct, but if you account quota over a longer period of time the user
will only temporary be allowed to go above his quota. He then need to wait
as much time for the quota to refill until he has access to the Internet
again.

> Maybe this could be solved by sending HEAD request in the self written
> redirector program and compare "Content-lenght:" field if present with
> current user quota. i don't know.

No, this is not a good approach for technical reasons, but it can be
solved by adding native quota support to Squid.

It might also be possible to solve it by some small extensions to
external_acl to have the content length sent to the helper when used from
http_reply_access. This will only work in Squid-3 and later however as
http_reply_access is non-blocking in Squid-2.5 and can not wait for the
external acl lookup to complete.. However, this will not work in
situations where the content length is not known (not indicated by the
origin server). Also there will be additional complications of this kind
when Squid goes HTTP/1.1.

However, personally I would prefer the relaxed approach where users are
allowed to temporarily go above quota. If not users will not ever be able
to download very large objects as they will always be above their quota.
With the relaxed approach they will be able to download this large object,
but then won't be able to access the Internet for a longer time
compensating for the fact that they overused their quota.

What is important in both is that the user when denied access due to quota
gets a clear message indicating what is the problem and when he will get
access again, and optionally a link to where to purchase/negotiate
additional bandwidth.

> Also we can't handle situation when user asked for big download and cancelled it during the process.

Why not? This will be logged, and the user is accounted for the amount he
downloaded before cancelling the download.

> P.S. we are using self coded billing with squid and since there are no
> squid hackers among us we don't know how to fight this feature.

And is one of the reasons why we have this list to discuss how to best
solve issues in how to use Squid in different situations.

Regards
Henrik
Received on Sat Oct 25 2003 - 03:11:57 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:20:40 MST