GKE Ingress

编程入门 行业动态 更新时间:2024-10-23 09:25:42
本文介绍了GKE Ingress-GCE是否支持压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在Rocket(Rust)的后端没有内置压缩功能.因此,它依赖于代理对其进行压缩.尽管nginx入口控制器支持它,但我认为默认的控制器是否也具有它,因为它具有高可用性.

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.

如果没有,我应该如何设置?

If it does not have, then how should I setup?

推荐答案

更新(2018-01-31):似乎Cloud HTTP(S)负载均衡器支持 > GZIP.您只需要从后端提供压缩的内容,负载均衡器就会将其继续传递.

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

但是,NGINX因Via标头而感到困惑(它认为代理不支持GZIP,并且在大多数云提供商上,这是正确的,但不是Google).请参阅以下常见问题解答: cloud.google/cdn/docs/troubleshooting#compression-not-working

However, NGINX is confused because of the Via header (it thinks proxies don't support GZIP, and on most cloud providers this is correct, but not Google). See this FAQ: cloud.google/cdn/docs/troubleshooting#compression-not-working

如果使用的是Nginx Web服务器软件,请修改nginx.conf 配置文件以启用压缩.该文件的位置 取决于nginx的安装位置.在许多Linux发行版中, 文件存储在/etc/nginx/nginx.conf中.允许nginx压缩为 使用HTTP(S)负载平衡,请将以下两行添加到 nginx.conf的http部分:

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: gzip_proxied any; gzip_vary on;

更多推荐

GKE Ingress

本文发布于:2023-10-16 05:37:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1496651.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:GKE   Ingress

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!