Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add gzip as content-encoding #762

Open
Ant-hem opened this issue Jun 28, 2019 · 5 comments
Open

feat: add gzip as content-encoding #762

Ant-hem opened this issue Jun 28, 2019 · 5 comments

Comments

@Ant-hem
Copy link
Member

Ant-hem commented Jun 28, 2019

The engine is introducing a new feature allowing to optionally compress request
payloads (ie. POST/PUT body, http or https).

To test it:

Perform a saveObject with the content encoded with GZIP
Don't forget to add: "Content-Encoding: gzip" as a header.

We will discuss a specification for a more detailed implementation.
Like adding a enableGZIP flag in client's configuration.

@Haroenv
Copy link
Contributor

Haroenv commented Jun 28, 2019

the flag should be contentEncoding: 'gzip' IMO :)

@vvo
Copy link

vvo commented Jul 1, 2019

For node: this is doable and could be beneficial for sure especially for big batches.

For browsers: is there a native way to encode gzip in browsers?

@Haroenv the header is the HTTP one, not the flag of the option. Actually there should be no option but rather just activate if doable or not

@Haroenv
Copy link
Contributor

Haroenv commented Jul 1, 2019

I think that as well, preferably no flag at all, but if necessary the flag shouldn't be specific to gzip :)

I've looked around, and couldn't find a good way to send gz via the browser, so it should just be disabled there I think

@aseure
Copy link

aseure commented Jul 10, 2019

Referencing our main task to keep track of this issue' status. https://github.com/algolia/algoliasearch-client-specs-internal/issues/30

edit: dead link updated (still private though).

@nunomaduro nunomaduro changed the title API Feature - Implement GZIP for POST/PUT [4.x] API Feature - Implement GZIP for POST/PUT Jan 31, 2020
@nunomaduro nunomaduro changed the title [4.x] API Feature - Implement GZIP for POST/PUT feat: add gzip as content-encoding Feb 21, 2020
@ghost
Copy link

ghost commented May 11, 2020

This feature is really important as soon as anybody expect to use the
Atomic Reindexing - https://www.algolia.com/doc/api-reference/api-methods/replace-all-objects/.

For example, we would need to upload about 100MB of json and following that rule of thumb - https://gist.github.com/jordansissel/3044155 - we would only need to upload between 20 and 30 MB if gzip content. This is day and night.

This issue is going to manifest more as people approach the size limit of 1 GB on the total request.
https://www.algolia.com/doc/api-reference/api-methods/add-objects/#about-this-method

BTW the https://github.com/algolia/algoliasearch-client-specs/issues/30 link is dead or unreachable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants