News KrakenD CE v2.7 released with better rate-limiting and security options

Enterprise Documentation

Recent changes

You are viewing a previous version of KrakenD Enterprise Edition (v2.5) , go to the latest version

Automatic Gzip compression on responses

Document updated on May 18, 2023

KrakenD Enterprise compresses with gzip all traffic returned to the client when the request contains an Accept-Encoding: gzip header.

This feature only talks about Gzipping responses
KrakenD understands gzipped responses from backends and decompresses them when it needs to manipulate the response. But this functionality talks about compressing all traffic back to the client.

The gzip response compression is not applied when the header is missing or when the Accept-Encoding header contains a text/event-stream value.

Gzip compression is unrelated to decompression when consuming content from your services. Decompression is also done automatically, but in all KrakenD flavors, not only Enterprise.

When the content is successfully compressed, the response contains a "Content-Encoding: gzip" header.

Double gzip compression
If your endpoints are mostly no-op, and your backend delivers the content gzipped, you should disable Gzip in KrakenD or the backend to avoid unnecessary compression.

Gzip configuration

The gzip is always on unless you disable it in the router section as follows:

  "version": 3,
  "extra_config": {
    "router": {
      "disable_gzip": true
Fields of "router"
* required fields

Enterprise only. All the output to the end user on the Enterprise Edition uses gzip when accepted by the client. Use this flag to remove gzip compression.
Defaults to false

Unresolved issues?

The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.