Applies To:
Show VersionsBIG-IP AAM
- 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0, 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
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.
Configuring variation rule settings
Configuring ambiguous query parameters as unnamed
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.