iRule::ology - Table Based Rate Limiting
What is iRule::ology, you ask? Well it’s a kind of catchy way of writing iRuleology, which is a term I’m coining right now, that sprouts from the vast and great mind of Jason Rahm, on the DevCentral...
Published Dec 13, 2010
Version 1.0Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
Karim
Mar 18, 2020Cirrostratus
Hi,
First thanks for this article !
I have a question however : why did you use the "request_limit_reached" variable ? would it work fine without it ?
Bellow is the same code you provide without the "request_limit_reached" variable ?
when HTTP_REQUEST timing on {
if { [expr [table incr "counter_all_requests"] % 15] == 0 } {
if { $[ table lookup "request_limit_reached" ] < 2 } {
table incr "request_limit_reached"
table timeout "request_limit_reached" 1
table lifetime "request_limit_reached" 1
}
}
if { [ table lookup "request_limit_reached" ] ne "" && [ table lookup "request_limit_reached" ] >= 2 } {
HTTP::respond 500
}
}
Is this variable only for clarity ? or am I missing something ?
by the way, jschilen I hope that you solved your issue since then , but just in case you have "[" instead of a "]" right before the "%" 🙂
Many thanks ,
Karim