Forum Discussion
HTTP request per second limit
Below is the iRule which Rate limit based on HTTP method
when RULE_INIT { set static::allowedRate 10 } when HTTP_REQUEST { set count [table loolkup -notouch [HTTP::method] ] if { $count eq "" } { Add entry into table with count as 1 for 1 second table add [HTTP::method] 1 1 } elseif { $count < $static::allowedRate } { Increment count table incr -notouch [HTTP::method] 1 } else { No of HTTP request exceeded per second do your action here HTTP::respond 503 } }
Syed
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
