<p>My backend, in Rocket (Rust), does not have compression built in. So, it is dependent on the proxy to compress it. Though nginx ingress controller supports it, I thought whether the default one had it too as it has high availability.</p>

<p>If it does not have, then how should I setup?</p>

<p><strong>UPDATE(2018-01-31):</strong>  It looks like Cloud HTTP(S) Load Balancer <strong>supports</strong> GZIP. You just have to serve compressed content from your backend and the load balancer will pass it on.</p>

<p>However, NGINX is confused because of the <code>Via</code> header (it thinks proxies don't support GZIP, and on most cloud providers this is correct, but not Google). See this FAQ: <a href="https://cloud.google.com/cdn/docs/troubleshooting#compression-not-working" rel="noreferrer">https://cloud.google.com/cdn/docs/troubleshooting#compression-not-working</a> </p>

<blockquote>
  <p>If you are using the nginx web server software, modify the nginx.conf
  configuration file to enable compression. The location of this file
  depends on where nginx is installed. In many Linux distributions, the
  file is stored at /etc/nginx/nginx.conf. To allow nginx compression to
  work with HTTP(S) load balancing, add the following two lines to the
  http section of nginx.conf:</p>

<pre><code>gzip_proxied any;
gzip_vary on;
</code></pre>
</blockquote>
