Nigel Kukard wrote: > >> I just want to follow up. If quota's windows is behaved like my >>> test(I could sent to 16 recipients in 5 minutes with a quota limit >>> at 8 recipients), I know this far-fetched in real environment. How >>> hard is to tweet the formula to block at exactly or close to the >>> quota limit. >> Why do you need an "exact" quota ? > >Actually ... this is EXACT quota using a dynamic window ... the only way >to make it more exact is much much bigger floating point numbers :D > >Fixed window quotas is imho alot less accurate ..... 10:55 => 11:00 , >allow 10 mails .... that means you can send 10 mails at 10:59 and 10 >again at 11:00. Thats 20 in a 2 minute period.
I think the OP is looking for true sliding window quotas - so if 10 were sent at 10:59, no more could be sent until 11:04 (assuming 5 minute window. Or more precisely, if 2 were sent at 10:57, and another 8 at 10:59, two more could be sent at 11:02, 8 more at 11:04, and so on. At it's done now, the user can send out 10 at 10:59, and over the next 5 minutes between then and 11:04, can dribble out about 10 more as the quota 'tails off' between successful sends - so 20 in 5 minutes. However, if they keep sending as fast as they'll go, then they'll only be able to dribble out about 2/minute - ie after the initial burst, they will be properly rate limited to 10/5minutes. But to take advantage of that burst, they must have sent no messages in the preceding period so as to reset the quota counter to zero - over a time of twice the quota period they cannot send more than the quota. I think that's the bit the OP is missing. >I'm going to be releasing RC2 in the very near future, hearing people >say "works, awesome" motivates :) I'm not in a position to test it as I don't have the resources for a test server - sorry. But it is an awesome bit of software. Many thanks from here. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users
