#6681 Enable gzip/deflate compression
Closed: Invalid Opened by cheimes.

In comment https://fedorahosted.org/freeipa/ticket/6655#comment:8 Petr pointed out that FreeIPA doesn't use compression for JSON RPC request and response. In my experience compressed JSON is always faster than uncompressed JSON. The overhead of TLS encryption and network IO is at least a magnitude higher than compression overhead.

FreeIPA framework doesn't need to handle output compression itself. Response compression can be automatically handled by Apache mod_deflate. It's one configuration line, either

SetOutputFilter DEFLATE

or

AddOutputFilterByType DEFLATE application/json  # add more content types

https://httpd.apache.org/docs/2.4/mod/mod_deflate.html


I was vague in that comment, I meant that it is 0.5MB IF NOT compressed to emphasize the amount of data in the response and not the actual transmitted size.

IPA uses mod_deflate in ipa.conf there is:

# Enable compression
AddOutputFilterByType DEFLATE text/html text/plain text/xml \
 application/javascript application/json text/css \
 application/x-font-ttf

So I think we can close this ticket.

Argh, I searched for GZIP and only later remember that it is called DEFLATE.

What about compression for request data? Does the client side JSON-RPC and XML-RPC compressed?

I don't know if CLI does any compression. Probably not. But CLI requests are usually small, so it won't probably make much difference.

Transparent compression of HTTP response is supported through Apache mod_deflate. Compression of HTTP request is not worth the extra trouble.

Metadata Update from @cheimes:
- Issue assigned to someone
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

Metadata