iRule::ology - Table Based Rate Limiting
Published Dec 13, 2010
Version 1.0Was this article helpful?
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