Skip to main content
Version: Release 24.1

HTTP GZIP Compression

You can configure GZIP compression in Release. GZIP compression is used to decrease the size of server responses and save bandwidth usage. There is a small overhead of server CPU usage to compress content. It is enabled by default, but you may want to adjust the settings depending on your use case.

If you have a fast network, or if there is an HTTP server in front of Release which already performs GZIP compression, you can disable it by setting enabled: false in the configuration, see table below.

Configuring the GZIP compression settings

To configure the GZIP settings:

  1. Add the xl, server and http properties to the XL_RELEASE_SERVER_HOME/conf/xl-release.conf configuration file.

  2. In the http property, add an additional gzip property. This property identifies the predefined GZIP configuration you wish to use. The supported values are:

    ParameterDescription
    enabledWhether to enable GZIP Compression. Default is true.
    minSizeContent over this size will be compressed. In bytes or HOCON format. Default is 10 kB.
    compressionCompression level from 0-9. Default is 4.
    excludedPathsList of string paths that will be excluded from the compression.

Sample GZIP compression settings

xl {
server {
http {
gzip {
enabled: true
minSize: 10 kB
compression: 4
excludedPaths: []
}
}
}
}

Disabling GZIP compression on the client side

GZIP is supported by default on most modern browsers. GZIP compression will only be used if the HTTP request's Accept-Encoding header contains the value gzip.