Fully transparent gzip/deflate compression in a reverse proxy setup

Matthias Müller matthias_mueller at tu-dresden.de
Thu Feb 21 12:50:22 UTC 2019


When running NGINX as a reverse proxy (e.g. in front of an application
server) I know how to switch on gzip/deflate from the documentation.

What I am looking for is a *transparent* compression by NGINX, i.e. the
proxied application server should be unaware that the original client
request was asking for a compressed response [1].

That way I want to ensure that compression is always performd by NGINX
rather that the proxied application server or a Microservice framework.
What I expect is that NGINX applies compression more efficiently than
the JAVA backend.


So I have 2 questions:
(1) Is my assumption correct that the NGINX reverse proxy compresses
more efficiently (in terms of Speed and CPU load) than the proxied
JAVA-based backend service?

(2) How do I enable transparent compression, i.e. mask [1] from the
proxied request so that the application server never attempts response
compression and always lets NGINX perform that task?


Thanks,
Matthias


[1]: Accept-Encoding: gzip, deflate



More information about the nginx mailing list