> 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.
This would be due to CMP demotion - If something in the virtual server config or the irule means that there will be issues with multithreading the traffic across multiple tmms (the default), then the virtual will be demoted from CMP and all the traffic will be processed on one core. This can be extremely detrimental to performance.
Just the use of the static:: keyword should not trigger CMP demotion - in fact, it is intended to be a CMP-safe way to share non-changing variables across tmm instances in a safe manner.
There may have been something else within the irule that caused CMP demotion for your irule.
> 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?
The static:: namespace is shared across all irules - so every irule will see all the static variables.
If you try to change a static:: variable within an irule, it will only change on the particular tmm, producing inconsistent results.