ADC

Variables

Variables are named objects that store information in the form of tokens. These tokens are used within and across different transactions on the Citrix ADC Appliance for internal computation and policy processing.

The Citrix ADC appliance supports creation of variables of the following types:

  • Singleton variables. Can have a single value of one of the following types: ulong and text (max-size). The ulong type is an unsigned 64-bit integer, the text type is a sequence of bytes, and max-size is the maximum number of bytes in the sequence.

  • Map variables. Maps hold values associated with keys: each key-value pair is called a map entry. The key for each entry is unique within the map. Maps are specified as follows:

    map (key_type, value_type, max-values).

    where,

    • key_type is the data type of the key. It is of type text (max-size).

    •  *value_type* is the data type of the values of the map. It can be of type ulong or text (max-size).
      
    •  *max-values* is the maximum number of entries that the map can contain. It is of type ulong.
      

Values for these variables are set using assignments which must be invoked on policy actions.

Note: Variables are not yet supported in a high-availability setup or in a cluster.

Variables Scope

A map variable or a singleton variable can have a global scope. Alternatively, the scope of a singleton variable can be limited to a single transaction.

  • Global Scope Variable - A variable with global scope (the default) has only one instance, and that instance has the same value(s) across all cores of a Citrix ADC appliance and across all nodes of a cluster or HA configuration. Global variable values exist until they are explicitly deleted, until they expire, or until a standalone appliance is restarted or all nodes of a cluster or HA configuration are restarted.
  • Transaction Scope Variable - A variable with transaction scope has a separate instance, with its own value, for each transaction processed by the Citrix ADC appliance. When the transaction processing is complete, the transaction variable value is deleted.

Note: Transaction scope variables are available in Citrix ADC release 10.5.e or later.

Variables