HTTP Data compression setup


LBL HTTP date compression allows to compress the data traffic to optimize the occupation of the band.

With LBL Application Delivery Controller it is possible to selectively compress individual data streams contextualized also for mime type.

This document is relevant only to the service configuration of the compression and the use of filter rules of component of balancing and routing. For the installation of the components LBL S.A.A.I. refer to documents installation of individual products.


Data compression HTTP is obtained through rules of rewrite to have maximum expressiveness and flexibility of application.

LBL Application Delivery Controller uses a refined technology of core parallelization of data compression. The compression occurs then exploiting to the full the parallelism of modern CPU multicore multithreaded and eliminating any synchronization point due to additional hardware outside of the CPU.

Setup compression

The setting of the compression in the processes of balancing and routing is obtainable through the application of simple rules to rewrite that influence and modify content.

The steps to follow are:

a) set the rule header

b) setting of the rule body

c) activation on the desired flow of rules

The system already contains the rules in order to be able to perform the compression of the body http/s and is sufficient to pick them up from the template and use them where necessary.


ADC Settings >Rewrite Management>Rewrite Header rules>[search] compression

In the example below we will go first to set up rules of rewrite necessary then we are going to apply them in data flows.

The compression of the data will be carried out in two times, verifying the possibility to compress the data and then data compression of the body.

This Double step is necessary because LBL Application Delivery Controller must first determine if the client and server are able to perform processings of compressed data or if the data are already compressed in origin and therefore should not be applied to the compression.

To perform the compression of the body is then simply copy the rule from the template on the ADC module where it will be used e.g.:

The choice of the form on which you want to copy the rule:

The copy result:

Save the change:

To analyze the rule simply go to edit and expand the panels:

Let us save the change:

Variables that can modify the behavior of the Rule . Between these threshold in bytes after which it is convenient to perform compression

Response queues for which it will be applied the compression

Data flow concerned

Object used by the ADC to perform compression

The condition of the request of the client to be able to perform compression

Types of mime type on which it will be applied the compression, you can add or remove mime type

An important parameter is the compression threshold. It is important to compress only if the result obtained is considerably improved. For improvement is meant a compression from 80% to 90%. These results can be obtained only with an object of dimensions sufficiently high and anyway higher than 2048 bytes. We recommend that you do not fall below the threshold of 2KB.

Setup compression РBody

After you set the rule to rewrite, for the determination of the possibility to perform compression, it is necessary to set up the rule of body that will induce compression during streaming of the body.

ADC Settings >Rewrite Management>body Rewrite rules>[search] compression

To use the rule simply copy it from the template in the module on which must be applied:

The result will be the following:

To analyze the rule is sufficient to enter into Edit:

Types of mime type on which it will be applied the compression, you can add or remove mime type

Variables that can modify the behavior of the Rule .

Object used by the ADC to perform compression

The condition of the request of the client to be able to perform compression

Response queues for which it will be applied the compression

Data flow concerned

The rule below lists the conditions of application as the direction “response” and the¬†response¬†code “200 OK”, then i¬†mime-types¬†on which will be carried out the¬†compression. The rule also carries the other two parameters:¬†cache_REDIM_factor¬†and¬†cache_Dim_MAX.

These parameters serve to LBL Application Delivery Controller to allocate memory spaces as (COW copy on write) for carrying out the compression. The parameter CACHE_REDIM_factor is the factor of enlargement of the buffer allocated initially for the compression. CACHE_Dim_MAX is the maximum size in memory of the object being compressed. Exceeded this dimension is reporting an error exceeding the maximum size of compression.

Setup compression РApplication rules on flows

As for the other rules of rewrite once defined to be applied must associate them to the streams in question. The Association is done by selecting the flow on which to apply the rules:

Example of application on all the flows of the ADC module selected:

ADC Settings>ADCs>Default rewrite rules>[rewriteHeaderRules] press Select Item

Select the rule compressionHEADER

Also select Always as operator so that this rule could be performed independently from other rules.

Perform the same operation for the rules of body

The result should be similar to the one below:

It is possible to apply the rules also on specific flows for collections such as on all the resources of a group:

ADC Settings>ADCs>Edit>Endpoints grouping>See details

Panel Rewriting rules

Or on all the resources of a single domain:

The panel of the domain rewriting rules:

Or on the individual groups of endpoints entering further in the See details

Panel rewrite rules of the endpoint:

It is also possible to apply the rule to general level and disable it in some flows. For example if we had set the rules on the general panel of the ADC module and we wanted to disable them only for some endpoints, this is possible with the operation (NOP).

Operation NOP set on the rules only on these endpoints

It is possible to have evidence of compression through the analysis of the traffic statistics. The statistics on the database contains data in-bound and out-bound of the two flows highlighting the differences between what is received and what transferred.