I wanted to achieve rate limiting based on certain rules.
- I should have only one sticky table.
- For each rule there should be one entry in the table.
- Unique Key will be a CRC32 of (IP & URL)
- If we get requests for same URL and from same IP, only then the counter should get incremented.
So the key will be a combination of IP & Path.
Can someone help me in writing ACLs for the same ?
Also please let me know if this can achieved using lua.
Is there an api which we can use from lua, to increment the counter based on a unique key ?