ADC

Configuring and binding a traffic rate policy

You implement rate-based application behavior by configuring a policy in an appropriate Citrix ADC feature. The feature must support default syntax policies. The policy expression must contain the following expression prefix to enable the feature to analyze the traffic rate:

sys.check_limit(<limit_identifier>)
<!--NeedCopy-->

Where limit_identifier is the name of a limit identifier.

The policy expression must be a compound expression that contains at least two components:

  • An expression that identifies traffic to which the rate limit identifier is applied. For example:
    http.req.url.contains("my_aspx.aspx").
<!--NeedCopy-->
  • An expression that identifies a rate limit identifier, for example, sys.check_limit(“my_limit_identifier”). This must be the last expression in the policy expression.

To configure a rate-based policy by using the command line interface

At the command prompt, type the following command to configure a rate-based policy and verify the configuration:

add cache|dns|rewrite|responder policy <policy_name> -rule expression && sys.check_limit("<LimitIdentifierName>") [<feature-specific information>]
<!--NeedCopy-->

Following is a complete example of a rate-based policy rule. Note that this example assumes that you have configured the responder action, send_direct_url, that is associated with the policy. Note that the sys.check_limit parameter must be the last element of the policy expression:

add responder policy responder_threshold_policy "http.req.url.contains("myindex.html") && sys.check_limit("my_limit_identifier")" send_direct_url
<!--NeedCopy-->

For information about binding a policy globally or to a virtual server, see “Binding Default Syntax Policies.”

To configure a rate-based policy by using the Citrix ADC GUI

  1. In the navigation pane, expand the feature in which you want to configure a policy (for example, Integrated Caching, Rewrite, or Responder), and then click Policies.

  2. In the details pane, click Add. In Name, enter a unique name for the policy.

  3. Under Expression, enter the policy rule, and make sure that you include the sys.check_limit parameter as the final component of the expression. For example:

    http.req.url.contains("my_aspx.aspx") && sys.check_limit("my_limit_identifier")
    <!--NeedCopy-->
    
  4. Enter feature-specific information about the policy.

    For example, you may be required to associate the policy with an action or a profile. For more information, see the feature-specific documentation.

  5. Click Create, and then click Close.

  6. Click Save.

Configuring and binding a traffic rate policy