Skip to content
Smarter by Design.Simpler for Business

lb compression ​

The lb compression command creates the compression profiles that manage the responses being sent to the client compressed. When the profile is bound to a vService, the listed content types are carried compressed. Its panel equivalent is the Compression screen.

Command Summary ​

TR7 WEB-CLI · lb compression
# Tab after the command
admin@TR7LBWAF01> lb compression
add delete list show update
 
admin@TR7LBWAF01> lb compression list # list all of them
admin@TR7LBWAF01> lb compression show <id> # show one
admin@TR7LBWAF01> lb compression add name <name> … # new profile
admin@TR7LBWAF01> lb compression update id <id> … # change
admin@TR7LBWAF01> lb compression delete <id> # delete
admin@TR7LBWAF01>  

Required Fields ​

OrderFieldStatusValue
1nameRequiredThe name of the profile; it must be unique in the collection

Fields ​

FieldWhat it doesWhat is written after it
--algorithmSelects the compression algorithmgzip (default) · deflate
--compressionLevelDetermines how tightly the compression will be doneA value between 1 and 9 (default 1). A high value gives a smaller output and spends more processor
--compressionOffLoadTurns on the compression being handed over to the hardware acceleratortrue · false (default false)
--fileTypes.NDetermines which content types will be compressedA content type, for example text/html; each with its own index. There has to be at least one type in the list, the default is text/plain

Compression does not bring a gain for every content

Compressing the already compressed types such as images, video and archives again spends processor and does not bring a gain in size. Text-based types are written in the list.

Examples ​

TR7 WEB-CLI · the compression profile
admin@TR7LBWAF01> lb compression add name web-compression --algorithm gzip --compressionLevel 6 \
--fileTypes.0 text/html --fileTypes.1 text/css --fileTypes.2 application/javascript
 
# removing a single type · emptying the list
admin@TR7LBWAF01> lb compression update id <id> --fileTypes.2.delete
admin@TR7LBWAF01> lb compression update id <id> --fileTypes.delete
 
admin@TR7LBWAF01> lb service update id <vService> --compression <profile>
admin@TR7LBWAF01> lb compression delete <id>
admin@TR7LBWAF01>  

Things to Know ​

  • A profile does not work on its own. The compression starts when the profile is bound to a vService with the --compression field. This field is found only in the vServices of the HTTP type.
  • The file type list cannot be left empty. There has to be at least one content type in the list.
  • The level is traded off against the processor. A high compression level gains bandwidth and increases the processor load.
  • The name is unique. A second profile with the same name cannot be created.