Forum Discussion
Perry_71428
Nimbostratus
Mar 12, 2009Global variables question
Hi
In the following rule from the CodeBase, is there a way that ::max_active_clients can be changed without the RULE_INIT being fired? When RULE_INIT gets fired the ::total_active_clien...
Perry_71428
Nimbostratus
Mar 12, 2009Thanks
Yes I did see the rule caveat, so no worries there.
So in the scenario that I have two virtual servers VS1 and VS2 and I wax max connections for VS1 to be 100 and for VS2 to be two hundred if could do something like this....
SET_MAX_LIMITS Irule
when RULE_INIT {
Set Global variables value without affecting the other iRule
set ::max_active_clients_vs1 100
set ::max_active_clients_vs2 200
}
I would then have 2 copies of the main irule (one assigned to VS1 and one assigned to VS2) that would have RULE_INIT sections like this...
when RULE_INIT {
Set Global variables value without affecting the other iRule
set ::total_active_clients_vs1 0
}
remainder of vs1 irule checking against ::max_active_clients_vs1
when RULE_INIT {
Set Global variables value without affecting the other iRule
set ::total_active_clients_vs2 0
}
remainder of vs2 irule checking against ::max_active_clients_vs2
When I want to adjust the ::max_active_clients_xxx I just amend the initial irule through the F5 control centre.
The only question I have is do I need to associate the "SET_MAX_LIMITS" irule to VS1 and/or VS2 or can it just sit standalone?
Thanks again.
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
