Hi Amos, Thanks for your answer. As I am really new in the proxy configuration. I want to be sure to understand well what you mean: I can build a system of quota reading "Squid access_log" so that it detects the traffic and then define a rule "external_acl_type" to block some IP if traffic is above a limit? thx, Vincent 2011/3/1 Amos Jeffries <squid3@xxxxxxxxxxxxx>: > On Tue, 1 Mar 2011 18:14:45 -0300, Vincent BLANQUE wrote: >> >> Hi everybody, >> >> I would like to limit the connection to my webserver defining policies >> relative to the data volume downloaded and the time connection by >> IP/by month. Do you think it is possible to implement it with Squid as >> a reverse proxy? Is it easy? > > No. Squid is not a good place to define quotas. > >> >> My server run with Django. As the user need to be authentified maybe >> it s a best solution to define a time limit thru the time session, but >> for the data volume downloaded? >> >> thx, >> >> Vincent > > The main purposes for having squid as reverse-proxy is to reduce backend > volume and add scalability. Placing quotas voids both of those benefits. > > Also, to complicate matters HTTP is stateless and the concept of time in > squid is dynamic. So sessions do not exist. > > The best way to run quotas is with an external system that keeps track or > requests and updates visitors permissions live. Squid can integrate with > such a system using its streaming access_log modules and external_acl_type > ACLs. > > Amos > >