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 solve this problem.
BR, Suresh Joshi.
10 Replies
- nitass_89166
Noctilucent
can you post the irule?
- Suresh_Joshi_01
Nimbostratus
irule_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 } }
- nitass
Employee
can you post the irule?
- Suresh_Joshi_01
Nimbostratus
irule_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 } }
- nitass
Employee
set static::period 300
can you try to shorten the period?
- Suresh_Joshi_01
Nimbostratus
I was tried this but problem still persist. Even we reduced holdtime from 900 to 300 but still the problem is not solved. - nitass
Employee
what was the period? have you tried a few seconds? by the way, you should not reduce the holdtime.
- nitass_89166
Noctilucent
set static::period 300
can you try to shorten the period?
- Suresh_Joshi_01
Nimbostratus
I was tried this but problem still persist. Even we reduced holdtime from 900 to 300 but still the problem is not solved. - nitass_89166
Noctilucent
what was the period? have you tried a few seconds? by the way, you should not reduce the holdtime.
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