Compression (Gzip or Deflate) Displays lists and views in Couchdb

Couchdb seems to automatically compress all of its _attachments upon request with the correct header. But, unfortunately, this does not happen for views, shows or lists.

Is there a way to achieve compression before returning the result to the client?

Is using a third-party library like deflatejs (not tested yet) a bad approach?

thanks

+4
source share
2 answers

You can use js-deflate in the show and list functions, but you cannot do this in view mode. I also suspect that it will be inefficient (just guess, check it if you want numbers).

Until CouchDB supports gzip encoding , the easiest solution is to set up a reverse proxy before CouchDB for compression. For example, you can use nginx with the HttpGzipModule .

+3
source

Distribution CouchBase CouchDase (Couchbase Single Server) supports instant Google compression for JSON files on disk. I think the same goes for views, but I have to relate to someone more skilled.

+1
source

All Articles