A Special Note About pool.use and pool.select

The pool.use() and pool.select() TrafficScript functions are used to decide which Pool should be used to send the connection to a back-end server. They each take one argument, the name of the Pool to use.

By default, pool.use() and pool.select() only accept a string literal as the Pool name:

pool.use( "my webserver pool" );

This allows the Traffic Manager to inspect a rule and determine precisely which pools are referenced by any Virtual Servers that use the rule. This information is used as follows:

To type check the usage of a Pool, to ensure that only configuration settings relevant to the protocol the Pool is managing are displayed, and to ensure that the same Pool is not used by Virtual Servers that manage different traffic protocols.

To determine which Pools are in use, so it can monitor the behavior of the nodes.

To display the Pools referenced by a Virtual Server, in the configuration summary, front page and other parts of the UI.

To determine when a Pool is no longer used, so that error information can be removed.

However, in some limited circumstances, it is efficient to use a variable to specify the desired Pool.

if( $poolname == "pool1" ) {

pool.use( "pool1" );

} else if( $poolname == "pool2" ) {

pool.use( "pool2" );

} else if( $poolname == "pool3" ) {

pool.use( "pool3" );

} else if( $poolname == "pool4" ) {

pool.use( "pool4" );

} # etc.

It would be much more preferable to write the following:

pool.use( $poolname );

To enable this behavior, enable the trafficscript!variable_pool_use setting on the System > Global Settings > Other Settings page in the Admin UI.

Be aware that if you enable the above behavior, the Traffic Manager is not able to determine accurately which Pools are referenced by a rule, and this limits the internal consistency checks and error monitoring that it performs for those Pools.