Forum Discussion
Bruno_Esteves_2
Nimbostratus
Apr 13, 2017iRule - Sliding window
Dears,
I'm trying to include a sliding window of time to counting requests. (e.g. if I have 8 req in 60 sec, block for 600 sec.)
So, I did change ($static::timeout $static::timeout) to ($static::...
Kevin_Davies_40
Nacreous
Apr 14, 2017Try the following..
when HTTP_REQUEST {
create a unique entry for each request that will expire in 60 seconds
table set -subtable "[IP::client_addr]:[HTTP::uri]" [TMM::cmp_unit][clock clicks] 0 60
if {[table keys -subtable "[IP::client_addr]:[HTTP::uri]" -count] > 8} {
log -noname local0. "REQUEST Rejected: current request for $client_IP_addr"
reject
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects