iRules variables in BIG-IP Next: behavior change

TL;DR - global variables are removed in BIG-IP Next. Read on for more details.

In classic BIG-IP, we have five different types of variables:

Type CMP
Friendly?
Mirrored? Syntax
Local Yes No set <key> <value>
$<key>
unse <key>
Global No No set ::<key> <value>
$::<key>
unset ::<key>
Static Yes Yes set static::<key> <value>
$static::<key>
unset static::<key>
Session Yes Yes session add uie <key> <value>
session lookup uie <key>
session delete uie <key>
Table Yes Yes

table set <key> <value>
table lookup <key>
table delete <key>

You'll notice that all the variable types in classic are CMP (clustered multi-processing) friendly except for global variables. What that means on the UNFRIENDLY side is that if you used global variables (deprecated since v10!) in an iRule, any traffic flowing through a virtual server in which that iRule was applied would be serviced by one TMM only, and the language we used around this was CMP demotion and TMM pinning. Obviously that is performance impacting to only have one (of n on your particular system) processor managing connections for a given virtual server, so our guidance since CMP was introduced was to avoid the use of global variables altogether, and if you use samples from the codeshare since before CMP was introduced, make sure to modernize them to make them friendly.

In BIG-IP Next, global variables are removed altogether. The syntax will still work, but the behavior will mimic the static variables. That said, regardless of the behavior change for globals, it's still our recommendation to avoid that syntax altogether and standardize on the static namespace for clarity in sharing iRules in the community and in support cases.

Updated Sep 02, 2024
Version 3.0
No CommentsBe the first to comment