Qatzip Compressor

Qatzip compressor provides Envoy with faster hardware-accelerated gzip compression by integrating with Intel® QuickAssist Technology (Intel® QAT) through the qatlib and QATzip libraries.

Example configuration

An example for Qatzip compressor configuration is:

static_resources:
  listeners:
  - address:
      socket_address:
        address: 0.0.0.0
        port_value: 10000
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          route_config:
            name: local_route
            virtual_hosts:
            - name: backend
              domains:
              - "*"
              routes:
              - match:
                  prefix: "/"
                route:
                  cluster: service
          http_filters:
          - name: envoy.filters.http.compressor
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor
              response_direction_config:
                common_config:
                  min_content_length: 100
                  content_type:
                  - application/octet-stream
              compressor_library:
                name: qatzip
                typed_config:
                  "@type": type.googleapis.com/envoy.extensions.compression.qatzip.compressor.v3alpha.Qatzip
                  compression_level: 3
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

  clusters:
  - name: service
    connect_timeout: 0.25s
    type: STRICT_DNS
    lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: service
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 127.0.0.1
                port_value: 1234
admin:
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 9901

How it works

If enabled, the Qatzip compressor will:

  • attach Qat hardware

  • create Threadlocal Qat session context for each worker thread

When a new http request comes, one worker thread will process it using its Qat session context and send the data needed to be compressed to Qat hardware.

Installing and using QATzip

For information on how to build/install and use QATzip see QATzip.