does nginx support gRPC compress? - nginx

I know nginx support http compress which can use gzip to compress http body.
And gRPC is build on http2.Does nginx support compress?
I have search the question for some days. but only same article tell me how to compress in server.

Related

nginx gzip - Caching

In the nginx config, I have enabled gzip compression on and I have not enabled any caching headers.
By default, whether nginx compress only the first client request and store the compressed files in the cache or does it compress for all the requests. Thanks.

Which is most appropriate place to compress responses when using a https reverse proxy?

I'm trying to serve gziped data to clients. The data comes from a nginx reverse proxy that supports https, and behind it there is a http server.
I wonder what's the best place to gzip data, the https reverse proxy or the http server?
There is a gzip_proxied directive nginx that seems to cater for the former. But if I compress data in the reverse proxy, when the http server returns compressed data, will it be compressed twice?

How to cache the gzip content in nginx?

when several clients request the same file, which is responsed by the gzip function in nginx . I hope that other responses could use the cached gzip content . How to config ?
There was a discussion of the same in NGINX forums.
I find that this suggestion makes the most sense. However, it mostly applies to when you do proxy with NGINX and not fastcgi cache.
Essentially you will ensure Accept-Encoding: gzip is sent to your backend to ensure that you always generate/cache gzipped content, and then use gunzip module for clients that don't request gzip encoding.

Do I have enable compression on nginx?

I enabled compression on IIS6 and it works. But if I make request through a nginx server (on other server) to my IIS6 server, there is no compression at all.
Do I have to enable compression on nginx? If I have to then there is no need to enable compression on IIS6?
There are headers you need to send to indicate the client supports compression.
You may need to add smth like:
Accept-Encoding: gzip, deflate
to your client request. Be careful - you'll need to decompress the result!
Update:
In case your server is nginx (and not IIS6) - here is the section explaining how to enable compression in nginx.

Is it possible to use Content-Encoding: gzip in a HTTP POST request?

I'm trying to upload some files with compression to a server. The files will be fairly large and the server is a standard HTTP server where the interface defines that they're not compressed. Is it possible to use something like Content-Encoding to indicate that the upload request is compressed, much like it is used for downstream compression?
Apache supports it with the mod_deflate module but I does not look a common web server feature. If you have access to the server you can enable this module or rewrite the server side code to handle your compressed data (e.g. a special servlet/php which call the original servlet/php with the decompressed data).

Resources