kuzzleio / kuzzle

Open-source Back-end, self-hostable & ready to use - Real-time, storage, advanced search - Web, Apps, Mobile, IoT -
https://kuzzle.io
Apache License 2.0
1.44k stars 124 forks source link

GZip support #1116

Closed Tyki closed 6 years ago

Tyki commented 6 years ago

Hi,

It would be great to have a native support for gzip, allow integrators to avoid a haproxy used only for gzip (for instance). It would also helps the HTTP usage with lighter XHR requests. I don't know if that's applicable to WS?

Feel free to ping me if you have any questions

Thanks

benoitvidis commented 6 years ago

Hi @Tyki ,

Thank you for your feedback. Indeed, this looks interesting to have, at least for http and probably Websocket (the protocol is supposed to support deflate).

Needs some investigation but definitely worth having a look at.

Aschen commented 6 years ago

Added to backlog : https://jira.kaliop.net/browse/KZL-169

Tyki commented 6 years ago

For some context, we are actually exposing an endpoint that is doing some exports and generating a JSON. The weight of the generatedJSON is around 10Mo and with Gzip, since it's only text, we could save a lot of space on this specific endpoint.

It might be even blocking sometimes when you use Kuzzle with AWS API Gateway since the response can't be over 10 Mo.

benoitvidis commented 6 years ago

As a workaround, handling it by hand should be possible but indeed requires quite a lot of extra-work.

scottinet commented 6 years ago

But if you can wait a bit, I'm working on the finishing touches of that feature. This should be available in our next release.

scottinet commented 6 years ago

This feature has been released in Kuzzle 1.3.1: https://github.com/kuzzleio/kuzzle/releases/tag/1.3.1