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()
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").
- 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.
配置使用comm率政策and 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 -rule expression && sys.check_limit("") []
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
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 configuration utility
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.
In the details pane, click Add. In Name, enter a unique name for the policy.
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")
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.
Click Create, and then click Close.
Click Save.