Forum Discussion
iRule - URI/Referer Rate limit per minute
The problem is that you are creating a record with an "indefinite" timeout period meaning, it will never go away.
The idea is that once a record is created for a URI in your case, that record should expire and automatically get deleted after a period of no Hits (when the URI is not seen/used).
So, change this command:
table set -subtable $limiter $get_count $limiter indefinite $static::windowSecs
Make it look like this:
table set -subtable $limiter $get_count $limiter $static::windowSecs $static::windowSecs
Here is a link to a throttling irule very similar to the one you are using:
https://devcentral.f5.com/codeshare/http-request-throttleNote: The iRule provided at the link does not use subtables and, rather than adding records and counting them, it increments the value held within a record. This is a much better approach. Better performance and saves a lot of memory. Also the iRule at the link throttles by IP address, it should be easy for you to modify it to throttle by URI. Your iRule may cause the Bigip to run out of memory under extremely heavy Load.
HTH
- Bruno_Esteves_2Dec 09, 2015
Nimbostratus
Hi John, Thank you for your time. I tried adjust the table set like you said, but didn't work. It's possible see on var/log/ltm the increasing of get_count? I'm going to test this throttling irule today and see If everything works fine. Thanks. Bruno
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com