Using Compression in Application Request Routing

By Won Yoo

September 23, 2009

This section of the document applies to Microsoft Application Request Routing Version 2 for IIS 7 and Above.

Goal

To understand and configure the content encoding compression feature in Application Request Routing (ARR).

Prerequisites

This is an advanced feature in ARR. This article assumes that you are familiar with the overall functionality of ARR and know how to deploy and configure ARR with disk cache. If you have not done so already, it is strongly recommended that you review the following walkthroughs before proceeding:

If Application Request Routing Version 2 has not been installed, you can download it at:

  • Microsoft Application Request Routing Version 2 for IIS 7 (x86) here.
  • Microsoft Application Request Routing Version 2 for IIS 7 (x64) here.

Follow the steps outlined in this document to install ARR Version 2.

Step 1 - Overview of compression feature in ARR.

Based on the accept-encoding request header, the Web servers may compress a response in an encoded (compressed) format that the client can understand. While many of the Web servers are capable of different compression formats, such as gzip or deflate, they may not be enabled. When requests are proxied using ARR and ARR is configured to be used as a cache proxy, ARR can be configured to compress the responses (and, therefore, cache the contents as compressed objects) even if the origin Web servers may not compress the responses based on the accept-encoding header.

The diagram below further shows how this feature is designed to work:

Step 2 - Enable/disable compression on ARR.

This feature is enabled by default and can be found on the Cache Configuration page.

  1. Launch IIS Manager.
  2. The disk cache for ARR is configured at the server level. Select the server in the navigation tree view.
  3. Double-click Application Request Routing Cache.
  4. In the Actions pane, click Cache Configuration.
  5. Use the Enable compression checkbox to enable or disable this feature in ARR.

Summary

You have now successfully configured and enabled a disk cache for ARR. For other ARR Version 2 walkthroughs, see the documents in this article.



Discuss in IIS Forums