cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
765
Views
0
Helpful
1
Replies

ace4710 compression on entire service policy when enabling in only one class

cbluhme
Level 1
Level 1

Hello

Im trying to make a ACE+caching setup work. Ace is running A5(1.2)
Content types considered static (like images, stylesheets and javascripts) should be fetched from caches instead of servers.
Content from the caches that can be compressed should be compressed by the ACE (stylesheets and javascripts).


I am classifying traffic into
* static, not compressable (content should be fetched from caches but is already compressed - this class will hold .jpg, .gif, .png, .ico and others - but for this experiment the class is defined with only (a never to be hit) content type .xico
* static, compressable (content should be fetched from caches but can be compressed by the ACE - this class will hold .css and .js but for this experiment is defined only with (never to be hit) content types .xjs and .xcss
other

For statistics purpose I have included a catch all class for everything else (which shold be send to servers) - class-default is configured but will not be hit in this example because of the catch-all class I configured.


Since both "STATIC" classes include only content types that has been renamed to content types not used in the real world, I will not expect any hits on those and since WWW.SITENAME.COM:80_STATIC_COMPRESSABLE is the only class configured for compression I expect that nothing will be compressed since there wil be no hits on this class.

This is how it looks in the configuration:

class-map type http loadbalance match-any WWW.SITENAME.COM:80_STATIC_NOT_COMPRESSABLE
  10 match http url .*.xico

class-map type http loadbalance match-any WWW.SITENAME.COM:80_STATIC_COMPRESSABLE
  10 match http url .*.xjs
  20 match http url .*.xcss

class-map type http loadbalance match-any WWW.SITENAME.COM:80_DEFAULT
  10 match http url .*

policy-map type loadbalance first-match WWW.SITENAME.COM:80
  class WWW.SITENAME.COM:80_STATIC_NOT_COMPRESSABLE        ! contains only content types not used

                                                           ! in the real world, like .xico
    serverfarm WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY backup WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
    nat dynamic 115130 vlan 823 serverfarm primary
    nat dynamic 115130 vlan 823 serverfarm backup
  class WWW.SITENAME.COM:80_STATIC_COMPRESSABLE            ! contains only content types not used

                                                           ! in the real world, like .xcss
    serverfarm WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY backup WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
    compress default-method deflate
    nat dynamic 115130 vlan 823 serverfarm primary
    nat dynamic 115130 vlan 823 serverfarm backup
  class WWW.SITENAME.COM:80_DEFAULT                        ! catch all class
    sticky-serverfarm WWW.SITENAME.COM:80
  class class-default                                      ! will not receive any hits because everything is

                                                           ! matched by the catch all class
    sticky-serverfarm WWW.SITENAME.COM:80

So I access the web page and looks at the statistics:


ACE/CONTEXT# show service-policy VLAN_811_INGRESS_FROM_INTERNET class-map WWW.SITENAME.COM:80=192.168.117.137:80 detail


Status     : ACTIVE
Description: Policy-map inspects ingress traffic from Internet
-----------------------------------------
Interface: vlan 1 811
  service-policy: VLAN_811_INGRESS_FROM_INTERNET
    class: WWW.SITENAME.COM:80=192.168.117.137:80
      nat:
        nat dynamic 17212 vlan 812
        curr conns       : 6         , hit count        : 6        
        dropped conns    : 0        
        client pkt count : 0         , client byte count: 0                  
        server pkt count : 0         , server byte count: 0                  
        conn-rate-limit      : -         , drop-count : -        
        bandwidth-rate-limit : -         , drop-count : -        
     VIP Address:                              Protocol:  Port:    
     192.168.117.137                           tcp    eq   80       
      loadbalance:
        L7 loadbalance policy: WWW.SITENAME.COM:80
        Regex dnld status    : QUEUED
        VIP ICMP Reply       : ENABLED-WHEN-ACTIVE
        VIP State: INSERVICE
        VIP DWS state: DWS_DISABLED
        Persistence Rebalance: ENABLED
        curr conns       : 6         , hit count        : 6        
        dropped conns    : 0        
        conns per second    : 0        
        client pkt count : 0         , client byte count: 0                  
        server pkt count : 0         , server byte count: 0                  
        conn-rate-limit      : -         , drop-count : -        
        bandwidth-rate-limit : -         , drop-count : -        
        L7 Loadbalance policy : WWW.SITENAME.COM:80
          class/match : WWW.SITENAME.COM:80_STATIC_NOT_COMPRESSABLE
            LB action :
               primary serverfarm: WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
               backup serverfarm : WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
            hit count        : 0        
            dropped conns    : 0        
            compression      : off
          class/match : WWW.SITENAME.COM:80_STATIC_COMPRESSABLE
            LB action :
               primary serverfarm: WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
               backup serverfarm : WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
            hit count        : 0                                    ! <-------------------
            dropped conns    : 0                                    ! No hits on the class with compression
            compression      : on                                   ! <-------------------
          class/match : WWW.SITENAME.COM:80_DEFAULT
            LB action: :
               sticky group: WWW.SITENAME.COM:80
                  primary serverfarm: WWW.SITENAME.COM:80
                    state:UP
                  backup serverfarm : -
            hit count        : 6                                    ! <-------------------        
            dropped conns    : 0                                    ! Only hits on the class

                                                                    ! with no compression
            compression      : off                                  ! <-------------------
          class/match : class-default
            LB action: :
               sticky group: WWW.SITENAME.COM:80
                  primary serverfarm: WWW.SITENAME.COM:80
                    state:UP
                  backup serverfarm : -
            hit count        : 0        
            dropped conns    : 0        
            compression      : off
      compression:
        bytes_in  : 380547                     bytes_out : 86750              
        Compression ratio : 77.20%                                   ! <-------------------
                Gzip: 0               Deflate: 81                    ! Compressed content being accounted
      compression errors:
        User-Agent  : 0               Accept-Encoding    : 0        
        Content size: 0               Content type       : 58       
        Not HTTP 1.1: 0               HTTP response error: 0        
        Others      : 0        
        Parameter-map(s):
          PARAMMAP_HTTP
          TCP_PARAM


Note that there are hits only on the WWW.SITENAME.COM:80_DEFAULT class which has "compression : off"
As expected, there are no hits on any other class including the class which has compression configured

But then why do I see things being accounted under compression and a compression rate calculated ?


So I remove the compression from the class WWW.SITENAME.COM:80_STATIC_COMPRESSABLE (again, which is never hit by any content so this should make no difference)


policy-map type loadbalance first-match WWW.SITENAME.COM:80
  class WWW.SITENAME.COM:80_STATIC_NOT_COMPRESSABLE
    serverfarm WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY backup WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
    nat dynamic 115130 vlan 823 serverfarm primary
    nat dynamic 115130 vlan 823 serverfarm backup
  class WWW.SITENAME.COM:80_STATIC_COMPRESSABLE
    serverfarm WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY backup WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
! compress command removed
    nat dynamic 115130 vlan 823 serverfarm primary
    nat dynamic 115130 vlan 823 serverfarm backup
  class WWW.SITENAME.COM:80_DEFAULT
    sticky-serverfarm WWW.SITENAME.COM:80
  class class-default
    sticky-serverfarm WWW.SITENAME.COM:80


Then I try accessing the web site again and I still as expected only see hits on the WWW.SITENAME.COM:80_DEFAULT, but now I dont see anything accounted under compression and no compression rate calculated :


ACE/CONTEXT# show service-policy VLAN_811_INGRESS_FROM_INTERNET class-map WWW.SITENAME.COM:80=192.168.117.137:80 detail

Status     : ACTIVE
Description: Policy-map inspects ingress traffic from Internet
-----------------------------------------
Interface: vlan 1 811
  service-policy: VLAN_811_INGRESS_FROM_INTERNET
    class: WWW.SITENAME.COM:80=192.168.117.137:80
      nat:
        nat dynamic 17212 vlan 812
        curr conns       : 6         , hit count        : 6        
        dropped conns    : 0        
        client pkt count : 0         , client byte count: 0                  
        server pkt count : 0         , server byte count: 0                  
        conn-rate-limit      : -         , drop-count : -        
        bandwidth-rate-limit : -         , drop-count : -        
     VIP Address:                              Protocol:  Port:    
     192.168.117.137                           tcp    eq   80       
      loadbalance:
        L7 loadbalance policy: WWW.SITENAME.COM:80
        Regex dnld status    : SUCCESSFUL
        VIP ICMP Reply       : ENABLED-WHEN-ACTIVE
        VIP State: INSERVICE
        VIP DWS state: DWS_DISABLED
        Persistence Rebalance: ENABLED
        curr conns       : 6         , hit count        : 6        
        dropped conns    : 0        
        conns per second    : 0        
        client pkt count : 0         , client byte count: 0                  
        server pkt count : 0         , server byte count: 0                  
        conn-rate-limit      : -         , drop-count : -        
        bandwidth-rate-limit : -         , drop-count : -        
        L7 Loadbalance policy : WWW.SITENAME.COM:80
          class/match : WWW.SITENAME.COM:80_STATIC_NOT_COMPRESSABLE
            LB action :
               primary serverfarm: WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
               backup serverfarm : WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
            hit count        : 0        
            dropped conns    : 0        
            compression      : off
          class/match : WWW.SITENAME.COM:80_STATIC_COMPRESSABLE
            LB action :
               primary serverfarm: WWW.SITENAME.COM:80_STATIC_CONTENT_PRIMARY
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
               backup serverfarm : WWW.SITENAME.COM:80_STATIC_CONTENT_BACKUP
                    state: UP
                     Dynamic NAT [nat pool: 115130, vlan: 823]
                     curr conns   : 0        
                     hit count    : 0        
                     dropped conns: 0        
            hit count        : 0        
            dropped conns    : 0        
            compression      : off
          class/match : WWW.SITENAME.COM:80_DEFAULT
            LB action: :
               sticky group: WWW.SITENAME.COM:80
                  primary serverfarm: WWW.SITENAME.COM:80
                    state:UP
                  backup serverfarm : -
            hit count        : 6        
            dropped conns    : 0        
            compression      : off
          class/match : class-default
            LB action: :
               sticky group: WWW.SITENAME.COM:80
                  primary serverfarm: WWW.SITENAME.COM:80
                    state:UP
                  backup serverfarm : -
            hit count        : 0        
            dropped conns    : 0        
            compression      : off
      compression:
        bytes_in  : 0                          bytes_out : 0                  
        Compression ratio : 0.00%                                    ! No more compression being accounted
                Gzip: 0               Deflate: 0        
      compression errors:
        User-Agent  : 0               Accept-Encoding    : 0        
        Content size: 0               Content type       : 0        
        Not HTTP 1.1: 0               HTTP response error: 0        
        Others      : 0        
        Parameter-map(s):
          PARAMMAP_HTTP
          TCP_PARAM


It would appear as is compression is enabled for the entire service-policy if just one class has compression enabled.

Im sure this is because I understand this behaviour incorrectly, so if anyone knows an explanation for this, please illuminate me.


Questions are:
Why do I see things being compressed when there is only being accounted hits in a compression:off class ?
Why does enabling compression in one class (never being hit) cause hits in other clases to be compressed ?

Thanks

1 Reply 1

Cesar Roque
Level 4
Level 4

Hi,

Could you please send me the running-config and let me know the VIP address we need to check

---------------------
Cesar R
ANS Team

--------------------- Cesar R ANS Team