In the custom compression mode, the compression actions are based on the custom compression rules defined. This section shows how to create custom compression filters.

To create a custom compression filter, from the Application Profile screen, choose Type as HTTP and select Enable Compression and follow the steps shown below:

Procedure

  1. Select Custom as the Compression Mode.


  2. Click Add under Compression Filters.
  3. Enter the following in the CREATE COMPRESSION FILTER screen:


    1. Provide a unique Name for the filter.
    2. Select the Match Rule to determine if the client (via Client IP or User Agent string) is eligible to be compressed via the associated Action. If both Client IP and User Agent rules are populated, then both must be true for the compression action to fire.
    Option Description

    Client IP Address

    Allows you to use an IP Group to specify eligible client IP addresses. For example, an IP Group called Intranet that contains a list of all internal IP address ranges. Clearing the Is In button reverses this logic, meaning that any client that is not coming from an internal IP network will match the filter.

    User-Agent

    Matches the client’s user-agent string against an eligible list contained within a String Group. The User-Agent is a header presented by clients indicating the type of browser or device they may be using. The System-Devices-Mobile Group contains a list of HTTP User-Agent strings for common mobile browsers.

  4. The Action section determines what will happen to clients or requests that meet the Match criteria, specifically the level of HTTP compression that will be used.
    Option Description

    Aggressive

    Uses Gzip level 6, which will compress text content by about 80% while requiring more CPU resources from both Avi Load Balancer and the client.

    Normal

    Uses Gzip level 1, which will compress text content by about 75%, which provides a good mix between compression ratio and the CPU resources consumed by both Avi Load Balancerand the client.

    None

    Removes compression. For clients coming from very fast, high bandwidth, and low latency connections, such as within the same data center, compression may actually slow down the transmission time and consume unnecessary CPU resources.