A selector is a filter for identifying requests. It consists of up to five individual Advanced policy expressions that identify request attributes such as the client IP address and the URL in the request. Each expression is a non-compound Advanced policy expression and is considered to be in an AND relationship with the other expressions. The following are some examples of selector expressions:
Selectors are used in rate limiting and action analytics configurations. A selector is optional in a rate limiting configuration but is required in an action analytics configuration.
The order in which you specify parameters is significant. For example, if you configure an IP address and a domain (in that order) in one selector, and then specify the domain and the IP address (in the reverse order) in another selector, the NetScaler considers these values to be unique. This can lead to the same transaction being counted twice. Also, if multiple policies invoke the same selector, the NetScaler, again, can count the same transaction more than once.
If you modify an expression in a selector, you may get an error if any policy that invokes it is bound to a new policy label or bind point. For example, suppose that you create a selector named myLimitSelector1, invoke it from myLimitID1, and invoke the identifier from a DNS policy named dnsRateLimit1. If you change the expression in myLimitSelector1, you might receive an error when binding dnsRateLimit1 to a new bind point. The workaround is to modify these expressions before creating the policies that invoke them.
The NetScaler appliance provides
built-in selectors for some of the most common use cases.
You can also configure a selector with expressions that identify the request attributes of your choice. For example, you might want to create a record for a request that arrives with a specific header. To evaluate the header, you can add HTTP.REQ.HEADER("<header_name>") to the selector that you intend to use.
To configure a selector by using the command line interface:
At the command prompt, type the following commands to configure a selector and verify the configuration: