Applies To:

Show Versions Show Versions

Manual Chapter: Configuring Matching Rules
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

To match HTTP requests to acceleration policies, the WebAccelerator system analyzes the information in the HTTP request and uses the matching rules to group the requests. Once matched to an acceleration policy, the WebAccelerator system applies the associated acceleration rules to each group of HTTP requests. The matching and acceleration rules that the WebAccelerator system uses to perform application matching are organized in the Policy Tree. Each leaf node in the Policy Tree consisting of matching rules and associated acceleration rules.
For example, for images files you might define a matching rule based on common image extensions found in HTTP requests. In this case, you could define an Image leaf node in the Policy Tree with a matching rule for requests that contain an extension of gif, GIF, jpg, JPG, jpeg, or JPEG. When the WebAccelerator system matches a request to the Image node, it applies the associated acceleration rules to properly handle image files for your site.
The WebAccelerator system performs application matching only against leaf nodes in the Policy Tree. Each leaf node has its own matching rule, with one or more defined parameters. For an HTTP request or response to match to a specific leaf node, it must match all the matching rules defined for the leaf node.
When you configure a matching rule on the WebAccelerator system, you specify a particular parameter on which to match a request, and you define its state. The state of the parameter can be one of the following:
absent
The parameter does not appear in the request.
empty
The parameter appears in the request, but has no value set for it.
appears with a specified value
The parameter appears in the request and matches a value that you specify. For example, its value must begin with a number.
For the WebAccelerator system to apply a matching rule to an HTTP request, that request must contain the same parameter as the rule, and the parameter must be in the same state that you defined for the rule. For example, if you create a matching rule based on a cookie parameter named sessionID, you specify that the sessionID cookie must be in one of the following states:
In the same example, if you create a matching rule based on a cookie parameter named sessionID and you specify that the sessionID cookie is empty, the WebAccelerator system matches the incoming request containing the sessionID cookie parameter with an empty value to the specified node, and applies the associated acceleration rules (such as variation, lifetime, and so forth) to the request.
Note: For some parameters, you can specify that the parameter name is case-sensitive, by enabling the Values are case sensitive setting when configuring the parameter options. For additional information about defining parameters, see Specifying HTTP request data type parameters.
For example, if two leaf nodes contain matching rules based on a path parameter, and a request matches both, then the WebAccelerator system matches to the leaf node with the rule that specifies the longest (most specific) path parameter.
Leaf node 1
Contains matching rules based on three query parameters.
Leaf node 2
Contains matching rules based on two of the same three query parameters as Leaf node 1.
Then WebAccelerator system considers a request that matches all three query parameters as a match. However, the WebAccelerator system matches the request to Leaf node 1, because that node is a superset and is the best match.
Leaf node 1
Contains three matching rules based on three query parameters.
Leaf node 2
Contains two matching rules based on two query parameters.
Then WebAccelerator system considers the query ambiguous, because the matching rules do not dictate that one leaf node is a better match than another node. For ambiguous queries, the WebAccelerator system chooses between the leaf nodes based on their priority in the Policy Tree.
In addition to precedence, the WebAccelerator system attempts to match first to the following two parameters, when performing application matching:
Matching rules based on the path parameter have first priority over all other parameter matches and the WebAccelerator system always chooses an exact path match before other path matches.
An exact path match is one where the value set for the path parameter includes the question mark. For example, if you have a rule with the following path parameter value:
the WebAccelerator system considers the following request an exact match, and matches the request to the leaf node to which the rule belongs.
It is important to note that a path of / and /? are two different things. A path that includes a ? indicates that an exact match is required.
By default, a path that you provide for a policy is a prefix. For example, if you give a parameter the path, /a/b, the WebAccelerator system considers both of the following requests a match:
If you add a question mark to the parameter so that it is, /a/b?, the WebAccelerator system considers only the following a match, because the question mark indicates that an exact match is required.
Matching rules based on the extension parameter have the second priority over other parameter matches. If the extension on a request matches the extension parameter specified by a matching rule, the WebAccelerator system matches the request to the leaf node to which the rule belongs.
If a request does not match a leaf node in the Policy Tree, the WebAccelerator system either uses a pre-defined accelerator policy that manages unmatched requests and responses, or sends the request to the origin server.
It is important to keep in mind that for the WebAccelerator system to consider a request a match, the request must match all the matching rules configured for a leaf node. If a request matches all the rules for a leaf node, except for one, the WebAccelerator system does not consider it a match and processes it as an unmapped request.
This section of the chapter provides information about how to configure a matching rule. For this example site, you have three top-level nodes in the Policy Tree as follows:
Home
This branch node specifies the rules related to the home page.
Applications
This branch node specifies the rules related to the applications for the site, with the following leaf nodes:
Default
This leaf node specifies the rules related to non-search related applications.
Search
This leaf node specifies the rules related to your sites search application.
Images
This branch node specifies the rules related to graphics images.
Note: See To create the Home, Application, and Images nodes for the example Policy Tree, for specific instructions about how to create the Policy Tree.
1.
On the Main tab of the navigation pane, expand WebAccelerator and click Applications.
The Applications screen opens in a new window.
2.
On the Main tab of the navigation pane in the new window, click Policies.
The Policies screen opens, displaying a table of user-defined and pre-defined acceleration policies.
3.
On the User-defined Acceleration Policies table, click the name of the acceleration policy that you created for the example on page 4-11.
The Policy Editor screen opens, displaying the Matching Rules screen.
5.
From the Add Parameter list, select Path, and click the Add button.
The path parameter screen opens.
6.
In the Value(s) box, type the values on which you want to base application matching. For this example, type the following:
/index.jsp
/?
7.
Click the Save button.
The path parameter screen refreshes with the new parameter.
9.
From the Add Parameter list, select Path, and click the Add button.
The path parameter screen opens.
10.
In the Value(s) box, type the values on which you want to base application matching. For this example, type the following:
11.
Click the Save button.
The path parameter screen refreshes with the new parameter.
13.
From the Add Parameter list, select Path, and click the Add button.
The path parameter screen opens.
14.
In the Value(s) box, type the values on which you want to base application matching. For this example, type the following value:
15.
Click the Save button.
The path parameter screen refreshes with the new parameter.
17.
From the Add Parameter list, select Path, and click the Add button.
The path parameter screen opens.
18.
In the Value(s) box, type the values on which you want to base application matching. For this example, type the following value:
19.
Click the Save button.
The path parameter screen refreshes with the new parameter.

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)