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
# 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
| Order | Field | Status | Value |
|---|---|---|---|
| 1 | name | Required | The name of the profile; it must be unique in the collection |
Fields
| Field | What it does | What is written after it |
|---|---|---|
--algorithm | Selects the compression algorithm | gzip (default) · deflate |
--compressionLevel | Determines how tightly the compression will be done | A value between 1 and 9 (default 1). A high value gives a smaller output and spends more processor |
--compressionOffLoad | Turns on the compression being handed over to the hardware accelerator | true · false (default false) |
--fileTypes.N | Determines which content types will be compressed | A 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
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
--compressionfield. 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.
