Forum Discussion
Suresh_Joshi_01
Nimbostratus
Dec 01, 2013irule_rate shaping
Hi All,
When we enabled irule_rate shaping in LTM we are facing cpu spiking issue,CPU is reached almost 90% but when we disable irule_rate shaping cpu normalize.
Pls suggest how we can solv...
nitass
Employee
Dec 01, 2013can you post the irule?
Suresh_Joshi_01
Nimbostratus
Dec 01, 2013irule_rate shaping -:
when RULE_INIT {
set static::maxquery 200
set static::period 300
set static::holdtime 300
}
when CLIENT_DATA {
if { [table lookup -subtable "blacklist" [IP::client_addr]] != "" } {
reject
return
}
set reqno [table incr "reqs:[IP::client_addr]"]
table timeout "reqs:[IP::client_addr]" [expr { $static::period * 2 }]
table set -subtable "reqrate:[IP::client_addr]" $reqno "ignored" indefinite $static::period
if { [table keys -count -subtable "reqrate:[IP::client_addr]"] > $static::maxquery } {
table add -subtable "blacklist" [IP::client_addr] "blocked" indefinite $static::holdtime
log local0. "Allowed QPS exceeded for user ip [IP::client_addr]"
reject
return
}
}
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