Applies To:

Show Versions Show Versions

Manual Chapter: BIG-IP version 9.2 - Solutions Guide for BIG-IP Traffic Management Systems: Compressing HTTP Responses
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>


10

Compressing HTTP Responses


Introducing HTTP data compression

An optional feature of the BIG-IP system is the system's ability to off-load HTTP compression tasks from the target server. All of the tasks that you need to configure HTTP compression, as well as the compression software itself, are centralized on the BIG-IP system.

The primary way to enable the HTTP compression option is by setting the Compression setting of an HTTP profile to Enabled. This causes the system to compress HTTP content for any responses matching the values that you specify in the Request-URI or Content-Type settings of the HTTP profile.

Tip


If you want to enable HTTP compression for specific connections, you can write an iRule that specifies the HTTP:compress enable command. For more information, see the Configuration Guide for Local Traffic Management.

Using the BIG-IP system HTTP compression feature, you can include or exclude certain types of URIs or files that you specify. This is useful because some URI or file types might already be compressed. Using CPU resources to compress already-compressed data is not recommended because the cost of compressing the data usually outweighs the benefits. Examples of regular expressions that you might want to specify for exclusion are .*\.pdf, .*\.gif, or .*\.html.

To configure HTTP data compression, you need to:

  • Create a custom HTTP profile
  • Create a virtual server to process compressed HTTP responses.

For more detailed, background information on configuring compression and virtual servers, see the Configuration Guide for Local Traffic Management.

Creating a custom HTTP profile

The first task in configuring HTTP data compression on the BIG-IP system is to create a custom HTTP profile. An HTTP profile defines the way that you want the BIG-IP system to manage HTTP traffic.

After you create the custom HTTP profile, you create a virtual server and assign the custom profile to that virtual server.

To create a custom HTTP profile

  1. On the Main tab of the navigation pane, expand Local Traffic, and click Profiles.
    This displays a list of any existing HTTP profiles, including the default profile http.
  2. In the upper-right corner of the screen, click Create.
    The New HTTP Profile screen opens.
  3. In the Name box, type a name for the custom profile, such as http_compress.
  4. Ensure that the Parent Profile setting is set to http.
  5. In the Settings area of the screen, retain all default values.
  6. In the Compression area, for the Compression setting, on the far right side of the screen, click the Custom box and select Enabled from the list.
  7. If you want to base compression on URIs specified in the HTTP request headers:
    1. Locate the URI Compression setting, click the Select box on the far right of the screen, and select URI List from the list.
      This displays the URI List settings.
    2. Specify any regular expressions that you want to include or exclude from compression.
      Examples of regular expressions are .*\.pdf, .*\.gif, or .*\.html.
  8. If you want to base compression on the type of response content:
    1. Locate the Content Compression setting, click the Select box on the far right of the screen, and select Content List from the list.
      This displays the Content List settings.
    2. Specify values for content you want to include or exclude from compression.
      Examples of content types that you can specify are application/pdf and image/**.
  9. For all other settings in the Compression area of the screen, retain the default values, or configure them to suite your needs.
  10. Click Finished.

Creating a virtual server

The next task in configuring HTTP compression is to define a virtual server that references the custom HTTP profile that you created in the previous section. You use the Configuration utility to create the virtual server. For more information about configuring a virtual server, see the Configuration Guide for Local Traffic Management.

To create a virtual server for HTTP compression

  1. On the Main tab of the navigation pane, expand Local Traffic, and click Virtual Servers.
    The Virtual Servers screen opens.
  2. In the upper-right corner of the screen, click Create.
    The New Virtual Server screen opens.
  3. In the Name box, type a name for the virtual server, such as vs_http_compress.
  4. In the Destination box, verify that the type of virtual server is Host, and in the Address box, type an IP address for the virtual server.
  5. In the Service Port box, type 80, or select HTTP from the list.
  6. In the Configuration area of the screen, retain the value of the Protocol setting, TCP.
  7. From the HTTP Profile list, select the custom HTTP profile that you created in the previous section. In our example, this value would be http_compress.
    This assigns the custom HTTP profile to the virtual server.
  8. In the Resources area of the screen, locate the Default Pool setting and select a pool name.
  9. From the Default Persistence Profile list, select source_addr.
    This implements the default profile for source address affinity persistence.
  10. Click Finished.

After you have created a custom HTTP profile and a virtual server, you can test the configuration by attempting to pass HTTP traffic through the virtual server. Check to see that the BIG-IP system includes and excludes the responses that you specified in the custom profile, and that the system compresses the data as specified.




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)