Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Stas Bekman
Dave Rolsky wrote: On Sat, 17 Jan 2004, Stas Bekman wrote: Dave Rolsky wrote: [...] The code I wrote isn't really designed so much to throttle requests as to impose quotas, so that you can say "no client can download more than X per day". This is more useful if you're delivering relatively large

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Dave Rolsky
On Sat, 17 Jan 2004, Stas Bekman wrote: > Dave Rolsky wrote: > [...] > > The code I wrote isn't really designed so much to throttle requests as to > > impose quotas, so that you can say "no client can download more than X per > > day". This is more useful if you're delivering relatively large fil

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Stas Bekman
Dave Rolsky wrote: [...] The code I wrote isn't really designed so much to throttle requests as to impose quotas, so that you can say "no client can download more than X per day". This is more useful if you're delivering relatively large files (like 200-900k RSS feeds, which I am) and you don't wa

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Dave Rolsky
On Sat, 17 Jan 2004, [EMAIL PROTECTED] wrote: > Have you looked at? > > http://www.snert.com/Software/mod_throttle/ Yes, it doesn't allow per-client throttling inside blocks, so it doesn't do what I need. In fact, my original message stated I looked at mod_throttle and mod_bandwidth. -dave

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread [EMAIL PROTECTED]
Hi, Have you looked at? http://www.snert.com/Software/mod_throttle/ HIH Best Regards, [EMAIL PROTECTED] -- /* Security is a work in progress - dreamwvr */ # 48 69 65 72 6F 70 68 61 6E 74 32 # Note: To begin Journey type man afterboot,man help,man

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Perrin Harkins
Dave Rolsky wrote: It uses DB_File to store the data. I should probably add locking, or maybe just an option to use BerkeleyDB.pm if available, and use that modules built-in locking. Yeah, DB_File is definitely not safe unless you are locking and untying it after every request. MLDBM::Sync does

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Randal L. Schwartz
> "Dave" == Dave Rolsky <[EMAIL PROTECTED]> writes: Dave> If you put the thing on CPAN, so others could use it for applications, Dave> that'd be great. But I can't tell people "go cut and paste this code Dave> listing on Randal's site"! I've finally figured out the CPAN trick. Up to just re

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Dave Rolsky
On Sat, 17 Jan 2004, Randal L. Schwartz wrote: > Perrin> By the way, did you look at Randal's throttle code? (Posted as > Perrin> Stonehenge::Throttle, I believe.) That's what I started with last > Perrin> time I needed to do this. It worked well over NFS for a cluster. > > And I'm thinking abo

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Perrin Harkins
Randal L. Schwartz wrote: And I'm thinking about rewriting that using DBD::SQLite for the tracker, rather than my ad-hoc "use the filesystem as a database" code from before. Actually, that was my favorite part of it. The fact that it used tiny atomic writes without locking made it work over NFS.

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Randal L. Schwartz
> "Perrin" == Perrin Harkins <[EMAIL PROTECTED]> writes: Perrin> By the way, did you look at Randal's throttle code? (Posted as Perrin> Stonehenge::Throttle, I believe.) That's what I started with last Perrin> time I needed to do this. It worked well over NFS for a cluster. And I'm thinkin

Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Perrin Harkins
Dave Rolsky wrote: So I wrote the code I needed, and I'd like to release it. I'm thinking of calling it Apache::Quota, since it does limits of total amount downloaded, as opposed to speed limits. OTOH, with the right config (30k per 30s or something), it does amount to speed limiting, so maybe Ap

Bandwidth limiting module: Apache::Quota

2004-01-17 Thread Dave Rolsky
So I wrote the code I needed, and I'd like to release it. I'm thinking of calling it Apache::Quota, since it does limits of total amount downloaded, as opposed to speed limits. OTOH, with the right config (30k per 30s or something), it does amount to speed limiting, so maybe Apache::Bandwidth (my