Applies To:

Show Versions Show Versions

Manual Chapter: Policy Management Guide for the BIG-IP WebAccelerator Module: 9 - Configuring Proxying Rules
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>


9

Configuring Proxying Rules


Using proxying rules

Proxying rules identify the elements in a HTTP request's URL that indicate whether the WebAccelerator system should send a request to your origin servers, instead of attempting to service it from its cache.

You can configure the following options for proxying rules:

  • Always proxy
    This option overrides all other proxying rules and options.
  • Proxy rules
    Where you can define specific options and parameters for proxying rules. In general, proxy rules options are only relevant to requests that match their node, rather than to matched responses.
  • Proxy overrides rules
    Where you define parameters and associated conditions under which the WebAccelerator system should ignore proxying rules options.

Organizing proxying rules in the Request Type Hierarchy tree

You organize proxying rules in the Request Type Hierarchy tree, with any associated proxying rules assigned to the leaf node. The WebAccelerator system applies proxying rules against only leaf nodes in the Request Type Hierarchy tree. The proxying rules defined for a leaf node are a combination of the proxying rules and data parameter types defined locally at the node, and any proxying rules and data parameter types that are inherited from the node's ancestors. For information about inheritance support in the Request Type Hierarchy, see Understanding hierarchy inheritance , located in Chapter 4.

Enabling the always proxy option

The always proxy option prompts the WebAccelerator system to always send specific requests to the origin server for content. This option applies to any request or response that matches a specified node. When the WebAccelerator system matches a response to a node that has the always proxy option enabled, it caches the response in accordance to the nodes caching rules; however, when the WebAccelerator system receives a subsequent request for the same content, it checks its cache and notes that the always proxy option is enabled. This prompts the WebAccelerator system to send the request to the origin server.

To configure the always proxy option

  1. On the Main tab of the navigation pane, click Policies.
    The Policies screen opens, displaying a list of acceleration policies.
  2. Click Edit next to the acceleration policy that you want to edit.
    The Policy Editor screen opens.
  3. From the Request Type Hierarchy tree, click the node for which you want to enable the always proxy option.
  4. On the acceleration policy menu bar, click Proxying.
    The Proxying rules screen opens.
  5. In the Options section, check the box next to Always proxy these requests.
  6. Click the Save button.

For the new policy to be in effect for your site, you must publish it. See Publishing acceleration policies , located in Chapter 3, for more information. Once you publish the acceleration policy, the WebAccelerator system sends all matched requests to the origin server.

Defining proxy rules options

In general, the WebAccelerator system attempts to service all HTTP requests from its cache. To determine if it can provide cached content to an HTTP request, the WebAccelerator system checks to see if the requested content is currently in its cache and if the cached content is fresh.

Note

For more information about how the WebAccelerator system services HTTP requests, see Processing requests .

For some types of requests, you may not want the WebAccelerator system to service content from its cache. You can use the proxy rules options to specify the conditions that prompt the WebAccelerator system to send specific requests to the origin server.

Proxy rules options are based on specific values for HTTP request data type parameters. When defining options for proxy rules, you identify the parameter that the WebAccelerator system should look for in a request, and specify the value it must have in order for the WebAccelerator system to send the request to the origin server. When the WebAccelerator system matches a request to the proxy rules option that you defined, it sends the request to the origin servers.

For example, you can set session tracking information in a cookie or segment parameter. When you do this, the WebAccelerator system sends any request that it receives without the tracking information, to the origin server so that it can set the tracking information.

Supported HTTP request data parameter types for proxy rules

The HTTP request data type parameters on which you can base proxy rules are:

  • Protocol
  • Host
  • Method
  • Query parameter
  • Unnamed query parameter
  • Path segment
  • Cookie
  • User agent
  • Referrer
  • Header
  • Client IP

Proxy rules example

For this example, you create a proxying rule based on a cookie named version, and define a proxy rules option that specifies that the WebAccelerator system must send the request to the origin server if one of the following is true:

  • The version cookie does not appear on the request.
  • The version cookie appears on the request, but has no value set for it (version is empty).

To define a proxy rules option based on the version cookie

  1. On the Main tab of the navigation pane, click Policies.
    The Policies screen opens, displaying a list of acceleration policies.
  2. Click Edit next to the acceleration policy that you want to edit.
    The Policy Editor screen opens.
  3. From the Request Type Hierarchy tree, click the node for which you want to define a proxy rules option.
  4. On the acceleration policy menu bar, click Proxying.
    The Proxying rules screen opens.
  5. In the Proxy Rules area, select Cookie from the Add Parameter list, and click the Add button.
    The Parameter Identity screen opens.
  6. In the Cookie box, type version.
  7. From the Value matches list, select Value does not match, and check the associated check box.
  8. In the regular expression box, type version.
  9. Check the box for Value is an empty string.
  10. Click the Save button.
    The Proxying rules screen refreshes and the new rule appears in the Proxy Rules summary table.

For the new policy to be in effect for your site, you must publish it. See Publishing acceleration policies , located in Chapter 3, for more information.

Using the proxy override rules option

Like proxy rules options, proxying override rules are based on specific values for HTTP request data type parameters. When configuring options for proxy override rules, you identify the parameter that the WebAccelerator system should look for in an HTTP request, and specify the value it must have in order for the WebAccelerator system to override the matched proxying rules. When the WebAccelerator system matches a request to the proxy override rules option that you defined, it services the request from its cache, even if the matched proxying rule dictates that the WebAccelerator should send the request to the origin server.

One common application for this option is for sites that receive a high volume of traffic related to web crawlers and robots clients, because proxy override rules ensure that your origin server does not have to manage the that traffic. It is especially important to consider a proxy override rule for this application if your proxy rules are based on a set cookie, because web crawlers and robots rarely present cookies in their requests.

Supported HTTP request data parameter types for proxy rules

The HTTP request data type parameters on which you can base proxy override rules are:

  • Protocol
  • Host
  • Method
  • Query parameter
  • Unnamed query parameter
  • Path segment
  • Cookie
  • User agent
  • Referrer
  • Header
  • Client IP

Proxy overrides rules example

For this example, you use a cookie to contain session tracking information. If the session tracking cookie is not presented on an HTTP request, you want the WebAccelerator system to send the request to the origin servers so that the origin servers can set cookie. As a result, you created a proxying rule based on the cookie. This rule indicates that the WebAccelerator system must send any request that does not include the cookie, or for which the cookie is empty, to the origin server. However, since your site experiences a lot of traffic from a web crawler, this proxy rule forces your origin server to handle every request from the web crawler, because the web crawler never presents a cookie. This places an unnecessary load on your origin servers.

You examine the origin server's log files and look to see if the web crawler presents a specific a string. For example, the web crawler might present a string for the HTTP USER_AGENT request header that looks very much like the value presented for MSIE 5.0 browsers. However, the web crawler adds badcrawler to the HTTP USER_AGENT string.

For this example, you add a proxy override rule to the node's proxying rules and base this rule on the User Agent parameter, to match this regular expression: .*badcrawler.*

To create the proxy override rule

  1. On the Main tab of the navigation pane, click Policies.
    The Policies screen opens, displaying a list of acceleration policies.
  2. Click Edit next to the acceleration policy that you want to edit.
    The Policy Editor screen opens.
  3. From the Request Type Hierarchy tree, click the node for which you want to define a proxy rules option.
  4. From the acceleration policy menu bar, click Proxying.
    The Proxying rules screen opens.
  5. In the Proxy Override Rules area, select User Agent from the Add Parameter list, and click the Add button.
    The Parameter Identity screen opens.
  6. In the Value(s) area, select Values matches from the list and check the Values matches check box
  7. In the box, type the regular expression that matches the user agent value. For this example, type .*badcrawler.*
  8. Click the Save button.
    The Proxying rules screen refreshes and the new rule appears in the Proxy Override Rules summary table.

For the new policy to be in effect for your site, you must publish it. See Publishing acceleration policies , located in Chapter 3, for more information.

Once published, the WebAccelerator system attempts to service, from its cache, all request that it receives with a HTTP USER_AGENT value that matches .*badcrawler.*, regardless of any proxy rules that the request matches.

Configuring a proxying rule example

This section of the chapter provides information about how to configure an example proxying rule. For this example site, you have three top-level nodes in the Request Type Hierarchy as follows:

  • Home
    Specifies the rules related to the home page.
  • Applications
    Specifies the rules related to the applications for the site, with child nodes, such as:
    • Default
      Specifies the rules related to non-search related applications.
    • Search
      Specifies the rules related to your site's search application.
  • Images
    Specifies the rules related to graphics images.
Note

See, To create the Home, Application, and Images nodes for the example Request Type Hierarchy tree , located in Chapter 4, for specific instructions about how to create the Request Type Hierarchy tree.

For this example, you use a segment parameter to contain special identifying information for your shopping cart application. Requests for your applications are all of the following form:

http://www.somesite.com/apps/doSomething.jsp;AAy23BV39

If the session tracking string does not appear in the segment parameter at the end of the URI, you want the WebAccelerator system to send the request to the origin servers for special handling.

For this example, you create a proxy rule for your Applications node with just one parameter based on the Path Segment data type. This rule should identify the subject as being:

  • Path ordinal 1 in the full path, as counted from right to left
  • Segment parameter ordinal 1
Note

See Path segment , located in Chapter 5, for information about path segments and their ordinals.

You set this rule to go into effect if the parameter value is an empty string or if the parameter is absent from the request.

To create the example proxying rule

  1. On the Main tab of the navigation pane, click Policies.
    The Policies screen opens, displaying a list of acceleration policies.
  2. Click Edit next to the acceleration policy that you want to edit.
    The Policy Editor screen opens.
  3. From the Request Type Hierarchy tree, click the Applications node.
  4. On the acceleration policy menu bar, click Proxying.
    The Proxying rules screen opens.
  5. In the Proxy Rules area, select Path Segment from the Add Parameter list, and click the Add button.
    The Parameter Identify screen opens.
  6. In the Alias box, type a meaningful name for the parameter.
  7. In the Segment Ordinal box, type 1 and from the list, select Numbering Right-to-Left in the Full Path.
  8. In the Parameter Ordinal box, type 1.
  9. In the Value(s) area, check the following check boxes:
    1. Value is an empty string
    2. Parameter is absent from the request
  10. Click the Save button.
    The Proxying rules screen refreshes and the new rule appears in the Proxy Rules summary table.

For a new or modified acceleration policy to be in effect for your site, you must publish it. See Publishing acceleration policies , located in Chapter 3, 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)