Edward Carraro wrote:

>1) why are there fractions in Counter

I dare say Nigel will give the full details, but the tracking isn't 
done by actually counting messages and waiting until each one times 
out. It's done algorithmically along the lines of :
Each time we process a message, reduce the quota according to the 
rate - eg something like if the quota is per 3600s and it's been 
1200s since the last message, then multiply the current value by 
2400/3600 (or subtract 1/3 of the value if you prefer to think of it 
that way).
If the number we now have is less than the quota value, then pass it 
- and add one to the tracking value.

>2) why is it going past my limit of 3

Because the message is passed if the tracking value is below the 
limit - the act of passing it, and tracking that fact, results in the 
tracking value being increased beyond the limit.

If you think about it, to track actual messages would involve a lot 
of data and a lot of work. It's far easier to calculate a rate which 
is a good approximation.

-- 
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

Reply via email to