Akshay_SK
Feb 17, 2020Nimbostratus
Use of static keyword in iRules
I had used the static keyword in my iRule some days ago in RULE_INIT event since I wanted certain variables to be globally declared as follows :
when RULE_INIT {
set static::windowSec 60
set static::queryCount 600
}
This use of static keyword caused a massive load on only one of the cores of F5 due to which I had to detach the iRule. Being a newbie I was unable to understand the root cause of this issue. Also I would like to know the following :
- Are static variables implementation same across all irules?
- Or are static variables same across multiple instances of same iRule?