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
another question would be; why do we even bother with the "%15" ? Isn't it possible just to do something like this :
when HTTP_REQUEST {
if { [ table lookup "request_limit_reached" ] < 30 } {
table incr "request_limit_reached"
table timeout "request_limit_reached" 1
table lifetime "request_limit_reached" 1
} else {
HTTP::respond 500
}
}
The only benefit I see of the modulo, is that it prevents the hole code from executing each time a request comes. And hence the irule would be, I suppose, a bit faster. am I wrong ? am I missing something ?
many thanks ,
karim