Manual Chapter : Using Acceleration Policies to Manage and Respond to HTTP Requests

Applies To:

Show Versions Show Versions

BIG-IP AAM

  • 14.1.3, 13.1.5, 13.1.4, 13.1.3, 13.1.1, 13.1.0, 13.0.1, 13.0.0

BIG-IP APM

  • 14.1.3, 14.1.2, 14.0.1, 14.0.0, 13.1.5, 13.1.4, 13.1.3, 13.1.1, 13.1.0, 13.0.1, 13.0.0
Manual Chapter

Overview: Acceleration policies

An acceleration policy is a collection of defined rule parameters that dictate how the BIG-IP® system handles HTTP requests and responses. The BIG-IP system uses two types of rules to manage content: matching rules and acceleration rules. Matching rules are used to classify requests by object type and match the request to a specific acceleration policy. Once matched to an acceleration policy, the BIG-IP system applies the associated acceleration rules to manage the requests and responses.

Depending on the application specific to your site, information in requests can sometimes imply one type of response (such as a file extension of .jsp), when the actual response is a bit different (like a simple document). For this reason, the BIG-IP system applies matching rules twice: once to the request, and a second time to the response. This means that a request and a response can match to different acceleration rules, but it ensures that the response is matched to the acceleration policy that is best suited to it.

Task summary for using acceleration policies to manage and respond to HTTP requests

Perform these tasks to use policies to manage and respond to HTTP requests.

Task summary

Accessing the Policy Viewer screen

The Policy Viewer displays the matching rules and acceleration rules for predefined acceleration policies.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a predefined acceleration policy.
The Policy Viewer screen appears for the predefined acceleration policy.
Note: You cannot edit the settings for a predefined policy.

Copying an acceleration policy

Create a user-defined acceleration policy most efficiently by copying an existing acceleration policy and modifying its rules to meet your unique requirements.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. In the Tools column, click Copy for the acceleration policy you want to copy.
  3. Name the policy.
  4. Specify a folder, based on your configuration.
    • For a symmetric or farm configuration, from the Sync Folder list, select the name of a symmetric folder.
    • For an asymmetric configuration, from the Sync Folder list, select No Selection.
  5. In the Description field, type a description.
  6. Click Copy.
The acceleration policy appears in the Policy column.

Creating a user-defined acceleration policy from a predefined acceleration policy

You can copy a predefined acceleration policy, and modify applicable nodes, matching rules, and acceleration rules, to create a user-defined acceleration policy.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. In the Tools column, click Copy for the predefined acceleration policy you want to copy.
  3. Name the policy.
  4. Specify a folder, based on your configuration.
    • For a symmetric or farm configuration, from the Sync Folder list, select the name of a symmetric folder.
    • For an asymmetric configuration, from the Sync Folder list, select No Selection.
  5. Click Copy.
  6. Click the name of the new user-defined acceleration policy.
  7. Create, delete, or modify nodes, matching rules, and acceleration rules, as necessary.
  8. Publish the acceleration policy.
    1. Click Publish.
    2. In the Comment field, type a description.
    3. Click Publish Now.
The user-defined acceleration policy appears in the Policy column.

Creating a new user-defined acceleration policy

You can create a new user-defined acceleration policy and define each matching rule and acceleration rule individually.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click Create.
  3. Name the policy.
  4. In the Description field, type a description.
  5. Click Create.
  6. Click the name of the new user-defined acceleration policy.
  7. Create the Policy Tree by defining branch nodes for groups of content, and leaf nodes for specific content.
  8. Specify the matching and acceleration rules for each node.
  9. Click Exit Policy Editor.
The acceleration policy appears in the Policy column.

Importing an acceleration policy

An acceleration policy must have been saved.
You can import a saved acceleration policy file, as necessary.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click Import.
  3. Click Browse, and browse to the location of the XML file that you want to import.
  4. Name the policy.
  5. Specify a folder, based on your configuration.
    • For a symmetric or farm configuration, from the Sync Folder list, select the name of a symmetric folder.
    • For an asymmetric configuration, from the Sync Folder list, select No Selection.
  6. Specify the overwrite method:
    • Select the Overwrite existing policy of the same name check box to replace an existing acceleration policy with the imported acceleration policy with the same name.
    • Clear the Overwrite existing policy of the same name check box to replace the existing acceleration policy.
  7. Click Import.
The acceleration policy appears in the Policy column.

Publishing a user-defined acceleration policy

When you create a new acceleration policy, you must publish it before you can assign it to an application. The BIG-IP device uses a modified acceleration policy to manage traffic only after you publish it.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. In the Tools column, click Publish for the user-defined acceleration policy you want to publish.
  3. Click Publish Now.
The user-defined acceleration policy is published.

Modifying an acceleration policy's rules

You can modify the acceleration rules for a user-defined acceleration policy to meet your unique requirements.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a user-defined acceleration policy.
  3. Click a node in the Policy Tree.
  4. From the Matching Rules menu, choose Acceleration Rules.
  5. Click an item on the Acceleration Rules menu to view the rules for that item.
  6. Edit the settings, as necessary.
  7. Click Save.
The modified rules appear for the acceleration rules menu item.

Viewing rules for an acceleration policy

You can view the acceleration rules for an acceleration policy and determine what rules apply to each node.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Specify the type of acceleration policy:
    • Click the name of a user-defined acceleration policy.
    • Click the name of a predefined acceleration policy.
  3. Click a node in the Policy Tree.
  4. From the Matching Rules menu, choose Acceleration Rules.
  5. Click an item on the Acceleration Rules menu to view the rules for that item.
The acceleration rules for the selected item appear for the node.

Saving an acceleration policy to an XML file

When you change an acceleration policy, you can export it to an XML file so that you always have a copy of the most recent acceleration policy.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click Export.
  3. In the Export list, select one of the following:
    Item Description
    Published Policy Exports an acceleration policy that an application is currently using. If the acceleration policy has not been published, this option does not display.
    Development Policy Exports an unpublished acceleration policy.
  4. Click Export.
  5. Click Save.
  6. Navigate to the location where you want to save the file.
  7. Click Save.
The acceleration policy is exported as an XML file.

Deleting a user-defined acceleration policy

You can delete a user-defined policy, as necessary.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Select the check box for the applicable acceleration policy.
  3. Click Delete.
The policy is deleted.

Overview: Policy Editor screen

From the Policy Editor screen, you can view the matching rules and acceleration rules for user-defined and predefined acceleration policies, as well as create or modify user-defined acceleration policies.

Policy Editor screen for an example acceleration policy

Policy Editor screen for an example acceleration policy

Task summary for using the Policy Editor

Perform these tasks to use the Policy Editor.

Task summary

Accessing the Policy Editor screen

The Policy Editor displays the matching rules and acceleration rules for user-defined acceleration policies, and enables you to modify user-defined acceleration policies.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a user-defined acceleration policy.
The Policy Editor screen appears for the user-defined acceleration policy.

Viewing the Policy Tree for an acceleration policy

Matching rules and acceleration rules for acceleration policies are organized on the Policy Tree, which you access from the Policy Editor screen.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Specify the type of acceleration policy:
    • Click the name of a user-defined acceleration policy.
    • Click the name of a predefined acceleration policy.
The Policy Tree appears on the left side of the Policy Editor screen.

Differentiating Requests and Responses with Variation Rules

Overview: Variation rules

When the BIG-IP® system caches responses from the origin web server, it uses certain HTTP request parameters to create a Unique Content Identifier (UCI). The BIG-IP system stores the UCI in the form of a compiled response, and uses the UCI to easily match future requests to the correct content in the module's cache.

You can configure variation rules to add or modify the parameters on which the BIG-IP system bases its caching process. If the BIG-IP system receives two requests that are identical except for the value of a query parameter defined in the variation rule, it creates a different UCI for each, and caches each response under its unique UCI.

Consider a site that receives requests from customers and partners, and wants to serve different content to each. For this site, you could create a variation rule in which you specify that when a request contains a version cookie set to a value of 1, the BIG-IP system serves a page specifically for customers, and when the version cookie is set to a value of 2, it serves a page specifically for partners. For this rule, the BIG-IP system caches the following three compiled responses.

  • For content produced for Cookie: version=1.
  • For content produced for Cookie: version=2.
  • For content produced when the version cookie does not appear in the request.
Note: When configuring this variation rule, you must specify a value for the version cookie parameter. If you do not, the BIG-IP system ignores the cookie's value and produces, at most, two compiled responses: one for requests that contain the cookie, and one for requests that do not contain the cookie. The BIG-IP system then serves the first response it caches to any subsequent requests that contain that cookie.

Configuring variation rule settings

You can configure variation rules to add or modify the parameters on which the BIG-IP system bases its caching process. If the BIG-IP system receives two requests that are identical except for the value of a variation rule parameter, it creates a different UCI for each, and caches each response under its unique UCI.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a user-defined acceleration policy.
  3. Click a node in the Policy Tree.
  4. From the Matching Rules menu, choose Acceleration Rules.
  5. Click Variation.
  6. Define the parameters that the BIG-IP system must match in a request.
The BIG-IP system creates a unique UCI for requests with different variation rule parameter values, and caches each response under its unique UCI.

Configuring ambiguous query parameters as unnamed

By default the BIG-IP system treats all ambiguous query parameters as a named query parameter without a value. You can, however, override this default behavior.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a user-defined acceleration policy.
  3. Click a node in the Policy Tree.
  4. From the Matching Rules menu, choose Acceleration Rules.
  5. Click Variation.
  6. Click All Query Parameters.
  7. Select the Treat ambiguous parameters as unnamed check box.
  8. Click Save.
The BIG-IP system treats all ambiguous query parameters as unnamed query parameters.

Variation rule example

This example shows a variation rule for a user-defined acceleration policy. For this example site, you have three top-level nodes on the Policy Tree.

  • 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 site’s search application.
  • Images. This branch node specifies the rules related to graphics images.

This site also has the following two considerations.

  • It needs to provide different branding information if the REFERER request header begins with, http://www.siterequest.com. Any other value for the REFERER request header does not affect the content served by your site.
  • It uses a query parameter called sessionID to track site users. This query parameter does not affect page content, and is used for tracking purposes only.

For this example, you create the following two variation rules.

  • REFERRER rule. You base this rule on the REFERER data type, and set it on the Applications node.
  • Query Parameter rule. You base this rule on the Query Parameter data type, and set on the Search node.

Creating an example Referrer rule

This example provides steps to configure a Referrer rule.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a user-defined acceleration policy.
  3. Click the Applications node.
  4. From the Matching Rules list, select Acceleration Rules.
  5. Click Variation.
  6. Click Referrer.
  7. In the Value Groups area, click Add.
  8. Select the Values matches check box, and in the adjacent box, type the regular expression that matches the value you expect on the REFERER request header, as follows: http://www\.siterequest\.com.*.
  9. From the Values Define list, select Different Content, to prompt the BIG-IP system to provide a unique page to matched requests.
  10. Click Save.
  11. Publish the acceleration policy.
    1. Click Publish.
    2. In the Comment field, type a description.
    3. Click Publish Now.
The example Referrer variation rule is configured.

Creating an example Query Parameter rule

The example provides steps to configure a Query Parameter rule.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a user-defined acceleration policy.
  3. Click the Search node.
  4. From the Matching Rules list, select Acceleration Rules.
  5. Click Variation.
  6. From the Add Parameter list, select Query Parameter and click the Add button.
  7. In the Name box, type sessionID.
  8. In the Values Groups area, click the Add button.
  9. Select the Values matches check box, and in the adjacent box, type the following regular expression, to indicate that the query parameter can have any value: .*.
  10. Select the Value is an empty string check box.
  11. From the Values Define list, select Same Content, to indicate that page content is not affected by this parameter.
  12. Click Save.
The example Query Parameter variation rule is configured.