On Mon, 15 Jun 2009 09:44:27 +0800, Jeff Pang <pangj@xxxxxxxx> wrote: > Amos Jeffries: >> On Sun, 14 Jun 2009 20:21:59 +0300, MonzT <Brave_Monz@xxxxxxxxxxx> wrote: >>>> maxconn only works on IPs. >>>> >>>> collapsed_forwarding limits outbound connections to one per URL and >>>> shares >>>> the results with as many clients as are requesting it. >>>> >>>> delay pools can be configured to use maxconn and object types to limit >>>> files over a certain size down to a low bandwidth. This has the added >>>> benefit of catching multiple files fro different sources under the one >>>> download cap. >>> Thanks... I'll try that collapsed_forwarding thing .. but I still think >>> that >>> I have to make custom redirector with a database or something to track >> each >>> requested url per ip. >>> Thanks again > > Amos, > > If we use a custom redirector, we know when request is coming, but how > can we know the response for this request is finished? Thanks. You don't. URL re-writer sole purpose is to tell Squid whether the URL part of the headers is to be altered before fetching or not. There is nothing else it can do. In order to detect length of transaction etc it would have to do the download itself and redirect the client to some local custom location where it stored the object. Amos