Cisco Application Control Engine (ACE) Troubleshooting Guide -- Troubleshooting Compression
From DocWiki
m |
m |
||
| Line 1: | Line 1: | ||
| - | This article describes the process and CLI commands for troubleshooting | + | This article describes the process and CLI commands for troubleshooting compression in the ACE. |
{| align="right" border="1" cellspacing = "0" | {| align="right" border="1" cellspacing = "0" | ||
| Line 46: | Line 46: | ||
| - | + | == Overview of Compression == | |
| - | You can configure compression by | + | You can configure compression by configuring the '''compress''' command under a Layer 7 policy. For example: |
class-map type http loadbalance match-any L7default-compression- exclusion-mime-type_CLASS | class-map type http loadbalance match-any L7default-compression- exclusion-mime-type_CLASS | ||
| - | |||
description Classmap for default SLB compression exclusion mime-types. | description Classmap for default SLB compression exclusion mime-types. | ||
| - | |||
2 match http url .*gif | 2 match http url .*gif | ||
| - | |||
3 match http url .*css | 3 match http url .*css | ||
| - | |||
4 match http url .*js | 4 match http url .*js | ||
policy-map type loadbalance first-match L7_COMP-TEST_SLB_POLICY | policy-map type loadbalance first-match L7_COMP-TEST_SLB_POLICY | ||
| - | |||
class L7default-compression-exclusion-mime-type_CLASS | class L7default-compression-exclusion-mime-type_CLASS | ||
| - | |||
serverfarm SFARM1 | serverfarm SFARM1 | ||
| - | |||
class class-default | class class-default | ||
| - | |||
serverfarm SFARM1 | serverfarm SFARM1 | ||
| - | |||
compress default-method deflate <<<<<<<<<<<<<<<<<<<<< | compress default-method deflate <<<<<<<<<<<<<<<<<<<<< | ||
| Line 79: | Line 70: | ||
The ACE does not compress the server response if the response contains HTTP/1.0, HTTP responses other than 200 OK and 100 Continue, and the following: | The ACE does not compress the server response if the response contains HTTP/1.0, HTTP responses other than 200 OK and 100 Continue, and the following: | ||
| - | + | * cache-control: not transform | |
| - | + | * content-MD5 | |
You can configure various others parameters using an HTTP parameter map (for example, mimetype and user-Agent). | You can configure various others parameters using an HTTP parameter map (for example, mimetype and user-Agent). | ||
| - | + | == Troubleshooting Tips == | |
| - | + | To display compression statistics, enter the following command: | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | switch/Admin# | + | switch/Admin# '''show service-policy MP detail''' |
| + | |||
| + | Status : ACTIVE | ||
| + | Description: ----------------------------------------- | ||
| + | Interface: vlan 1 108 | ||
| + | service-policy: MP | ||
| + | class: vip | ||
| + | VIP Address: Protocol: Port: | ||
| + | 2.0.5.1 tcp eq 80 | ||
| + | loadbalance: | ||
| + | L7 loadbalance policy: pm | ||
| + | VIP ICMP Reply : ENABLED | ||
| + | VIP state: OUTOFSERVICE | ||
| + | Persistence Rebalance: ENABLED | ||
| + | curr conns : 0 , hit count : 0 | ||
| + | dropped conns : 0 | ||
| + | client pkt count : 0 , client byte count: 0 | ||
| + | server pkt count : 0 , server byte count: 0 | ||
| + | conn-rate-limit : 0 , drop-count : 0 | ||
| + | bandwidth-rate-limit : 0 , drop-count : 0 | ||
| + | L7 Loadbalance policy : pm | ||
| + | class/match : h | ||
| + | ssl-proxy client : c | ||
| + | LB action : | ||
| + | primary serverfarm: sf1 | ||
| + | state: DOWN | ||
| + | backup serverfarm : - | ||
| + | hit count : 0 | ||
| + | dropped conns : 0 | ||
| + | compression : on '''<------------------------------ Compression is enabled if the value is "on"''' | ||
| + | compression: | ||
| + | bytes_in : 0 bytes_out : 0 '''<--- Number of bytes transmitted after compressing the server response''' | ||
| + | Compression ratio : 0.00% '''<------------------------------ Ratio of data compressed''' | ||
| + | Gzip: 0 Deflate: 0 '''<--------------- Number of times the method is used''' | ||
| + | compression errors: _ | ||
| + | User-Agent : 0 Accept-Encoding : 0 | | ||
| + | Content size: 0 Content type : 0 | | ||
| + | Not HTTP 1.1: 0 HTTP response error: 0 |-- '''Check these error counters to see if they are increasing''' | ||
| + | Others : 0 | | ||
| + | Parameter-map(s): _| | ||
Revision as of 16:59, 11 March 2011
This article describes the process and CLI commands for troubleshooting compression in the ACE.
Contents |
Overview of Compression
You can configure compression by configuring the compress command under a Layer 7 policy. For example:
class-map type http loadbalance match-any L7default-compression- exclusion-mime-type_CLASS
description Classmap for default SLB compression exclusion mime-types. 2 match http url .*gif 3 match http url .*css 4 match http url .*js
policy-map type loadbalance first-match L7_COMP-TEST_SLB_POLICY
class L7default-compression-exclusion-mime-type_CLASS serverfarm SFARM1 class class-default serverfarm SFARM1 compress default-method deflate <<<<<<<<<<<<<<<<<<<<<
For compression to work, a client must send a request with an ACCEPT-ENCODING method of gzip or deflate. If a client sends both methods, then the ACE uses the configured method. The ACE rewrites the ACCEPT-ENCODING header to IDENTITY to indicate to the server that it should not compress the return data. By default, the ACE does not compress responses that are less than 512 bytes. You can change this minimum size threshold by using an HTTP parameter-map as follows:
parameter-map type http http compress minimum-size 100
The ACE does not compress the server response if the response contains HTTP/1.0, HTTP responses other than 200 OK and 100 Continue, and the following:
- cache-control: not transform
- content-MD5
You can configure various others parameters using an HTTP parameter map (for example, mimetype and user-Agent).
Troubleshooting Tips
To display compression statistics, enter the following command:
switch/Admin# show service-policy MP detail
Status : ACTIVE
Description: -----------------------------------------
Interface: vlan 1 108
service-policy: MP
class: vip
VIP Address: Protocol: Port:
2.0.5.1 tcp eq 80
loadbalance:
L7 loadbalance policy: pm
VIP ICMP Reply : ENABLED
VIP state: OUTOFSERVICE
Persistence Rebalance: ENABLED
curr conns : 0 , hit count : 0
dropped conns : 0
client pkt count : 0 , client byte count: 0
server pkt count : 0 , server byte count: 0
conn-rate-limit : 0 , drop-count : 0
bandwidth-rate-limit : 0 , drop-count : 0
L7 Loadbalance policy : pm
class/match : h
ssl-proxy client : c
LB action :
primary serverfarm: sf1
state: DOWN
backup serverfarm : -
hit count : 0
dropped conns : 0
compression : on <------------------------------ Compression is enabled if the value is "on"
compression:
bytes_in : 0 bytes_out : 0 <--- Number of bytes transmitted after compressing the server response
Compression ratio : 0.00% <------------------------------ Ratio of data compressed
Gzip: 0 Deflate: 0 <--------------- Number of times the method is used
compression errors: _
User-Agent : 0 Accept-Encoding : 0 |
Content size: 0 Content type : 0 |
Not HTTP 1.1: 0 HTTP response error: 0 |-- Check these error counters to see if they are increasing
Others : 0 |
Parameter-map(s): _|