[SR-Users] Calls per second

Alex Balashov abalashov at evaristesys.com
Thu Jul 3 14:12:27 CEST 2014


I do it using htable. I maintain a rolling 3-second sample of number of 
calls in 'htable', the tail of which is auto-expired. The need to 
implement CPS limits was the basis for the 'updateexpires' option I 
added to the htable code in Dec 2011--I wanted updates not to cause 
entries' expiration time to be reset.

Divide by 3, get CPS. It's crude, but effective. One can, of course, 
have a longer sampling window.

-- 
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906



More information about the sr-users mailing list