[OpenSIPS-Users] Use of Ratelimit Module as CPS limiter
Will Baz
bart_allen_13 at yahoo.com
Wed Apr 18 21:30:13 CEST 2012
Hi All,
I have been taking a look at the ratelimit module to limit CPS as suggested by a few prior posts. I believe I have the gist of it (it's a key/value store w/ specialized algorithms to calculate when a limit is reached), but I was wondering if someone could explain best practices for removing values from the key/value store?
Specifically I was planning on limiting CPS by entering a string for my key that represents the "second" and increment. So something like this:
rl_check("080101", 5, <some algorithm>)
We could also add a trunk_id to the front of that string to limit CPS on a particular trunk or IP or whatever. Then when a call comes in at that specific second we increment the counter and check to see if there have already been 5 calls that second.
What I'm not clear on looking at the module description (http://www.opensips.org/html/docs/modules/devel/ratelimit.html) is how I could destroy certain key/value pairs once I don't need them anymore (because the second is over). I do not want to have 3600 values an hour sitting in memory.
Anyways, if someone has used ratelimit in a similar fashion or may understand it better than I, I'd appreciate any feedback.
Thanks!
Will
PS, Apologies if this is a duplicate. I originally posted w/o being a member of the lists. I joined and then reposted assuming my original would not be posted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120418/375b8a4e/attachment.htm>
More information about the Users
mailing list