gpt4 book ai didi

kubernetes - GKE Ingress-GCE 是否支持压缩?

转载 作者:行者123 更新时间:2023-12-02 17:26:08 24 4
gpt4 key购买 nike

我的后端在 Rocket (Rust) 中没有内置压缩功能。因此,它依赖于代理来压缩它。虽然nginx入口 Controller 支持它,但我想默认的入口 Controller 是否也有它,因为它具有高可用性。

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

最佳答案

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

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

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;

关于kubernetes - GKE Ingress-GCE 是否支持压缩?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48039952/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com