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 rules and acceleration rules that the WebAccelerator system uses to perform application matching are organized on the Policy Tree. Each leaf node on 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 on 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 on 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.
Once you create the matching rules for an acceleration policy, you can configure the various acceleration rules to handle requests.
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 the existing acceleration policies.
3.
On the User-defined Acceleration Policies table, click the name of the acceleration policy that you want to edit.
The Policy Editor screen opens, displaying the Matching Rules screen.
5.
From the Add Parameter list on the Matching Rules screen, select a parameter, and then click the Add button. The parameter options display.
7.
Click the Save button.
For a modified acceleration policy to be in effect for your site, you must publish it. One way to do this is to click the Publish button from any screen within the Policy Editor to open the publish screen. We recommend that when you make a series of changes to an acceleration policy, you click the Publish button on the Policy Editor screen only after you make the last change in the series. Alternatively, you can publish an acceleration policy from the Policies screen. See Publishing acceleration policies, for more information.
When you configure a matching rule on the WebAccelerator system, you define particular parameters on which to match a request. Matching rules are based on the following HTTP request data type parameters:
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 Understanding how the WebAccelerator system uses HTTP headers.
In addition to these HTTP data type parameters, matching rules can also be based on the following HTTP response header data parameters.
Unlike HTTP request data types, matching rules are not based directly on the value of an HTTP response data parameter. Instead, the WebAccelerator system uses these values to classify a request or response and generate a object type.
For requests, the classification is based on the file extension present in the request. For example, a matching rule might specify that the WebAccelerator system place all requests with a .gif extension into a group for images.
For responses, the WebAccelerator system matches on object type, basing the classification on the first information present, in the following order:
The file extension from the file name field in the Content-Disposition header in the response
The file extension from the extension field in the Content-Disposition header in the response
The Content-Type header in the response (unless it is an ambiguous MIME type)
Once the WebAccelerator system classifies a request or response by object type, it generates a content type for it by appending the object type to the group to which the object type belongs.
You can then define a matching rule based on the object type, for example the Content-Type header, by specifying the regular expression for the WebAccelerator system to match, or not to match, to the content type in a request or response.
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 the existing acceleration policies.
3.
On the User-defined Acceleration Policies table, click the name of the acceleration policy that you want to edit.
The Policy Editor screen opens, displaying the Matching Rules screen.
5.
From the Add Parameter list, select Content Type and click the Add button.
The Content Type parameter options display.
6.
In the Value(s) area, select Value Matches or Value does not match from the list and check the box next to your selection.
7.
In the Value(s) box, type a regular expression that you want to match or not to match.
8.
If you want an object to match to the node, even if it is not classified in the /config/wa/globalfragment.xml file, check the Match if not yet classified check box. (For more information about classifying responses, see Classifying responses.)
9.
Click the Save button.
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 on the Policy Tree.
In addition to precedence, the WebAccelerator system attempts to match first to the following two HTTP request data type 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 on 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 web server for content.
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 on 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 the existing acceleration policies.
3.
On the User-defined Acceleration Policies table, click the name of the example acceleration policy you created in Configuring a Policy Tree example for a user-defined acceleration policy.
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:
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.
For a new or modified acceleration policy to be in effect for your site, you must publish it. One way to do this is to click the Publish button from any screen within the Policy Editor to open the publish screen. We recommend that when you make a series of changes to an acceleration policy, you click the Publish button on the Policy Editor screen only after you make the last change in the series. Alternatively, you can publish an acceleration policy from the Policies screen. See Publishing acceleration policies, for more information.
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

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)