dave_it_25516
Aug 23, 2012Nimbostratus
Global Variables
If a global variable exist in an iRule and it is not applied to a Virtual Server, does it still have any affect on the F5 or the traffic.
Does a global variable need to be applied to a Virtual Host to have any affect on traffic?
If a global variable exists in an iRule, does that variable only affect the Virtual Server it is applied to?
Example. Virtual Host for example.com has an iRule applied to it that contains global variables set for pool selection based on what is contained in the "host" of the request.
Since this iRule exist and is applied to a Virtual Server, does that mean it would affect requests to a separate virtual host that doesn't have that iRule applied?
So would a request for qa.mysite.com be routed to a pool_qa_dest as declared in another iRule applied to the virtual server for example.com since the variable is global?
if { [string tolower [HTTP::host]] contains ".qa." } {
set poolDestination $::pool_qa_dest
} elseif { [string tolower [HTTP::host]] contains ".uat." } {
set poolDestination $::pool_uat_dest
} else {
set poolDestination $::pool_prod_dest
}