Forum Discussion
anthony_102289
Jun 17, 2010Nimbostratus
That looks great Bhattman! I am wondering what ways there are to remotely modify the global variable max_active_clients. I've worked out two ways but not sure if there is a better way,
1 - Use iControl to delete and recreate a dummy irule. On the creation of the irule it will automatically run the RULE_INIT routine and modify the global variable.
iRule - Dummy_Rule
when RULE_INIT {
set ::max_active_clients 30
log local0. "Changing max_active to $::max_active_clients"
}
2 - Use a data group to keep the variable and modify it with iControl. In this example MAX_USERS is a data group with one element.
Likely would need to move the creation of the variable into the "when HTTP_REQUEST" routine.
when HTTP_REQUEST {
set ::max_active_clients [class element 0 MAX_USERS]
Anthony