Comments (7)
是不是配置了 proxy-next-upstream-timeout 呢,如果超过这个时间,是不会进行重试的,这个nginx也是这样的
from higress.
是不是配置了 proxy-next-upstream-timeout 呢,如果超过这个时间,是不会进行重试的,这个nginx也是这样的
from higress.
@SpecialYang 确认下目前实现,我看envoy的实现机制和nginx还是有差异,必须指定per-try-timeout比总的超时时间短才会做超时重试,相当于如果配置了timeout注解,就等价于配置了nginx的proxy-next-upstream-timeout :https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#config-http-filters-router-x-envoy-retry-on
from higress.
higress/pkg/ingress/kube/annotations/retry.go
Lines 66 to 70 in a140f78
现在将proxy-next-upstream-timeout映射到perRetryTimeout,会和nginx ingress行为不一致。
我觉得可以加个注解来指定perRetryTimeout,如果注解未指定时,则默认设置为比路由超时小(比如减1秒),这样来做兼容
nginx的行为可以参考:
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#custom-timeouts
https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_timeout
如果设置了proxy-next-upstream-timeout,当超过这个timeout后不会重试,不设置则超时会一直重试。虽然一般最佳实践也是把这个值配成和路由超时时间一致。
envoy的行为可以参考:
当每次重试超过per_try_timeout时,会进行重试,但如果整体超时时间超过路由的timeout,就不会重试。
from higress.
那nginx这个proxy-next-upstream-timeout 注解有什么意义呢?跟它的名字都有点违背。
from higress.
那nginx这个proxy-next-upstream-timeout 注解有什么意义呢?跟它的名字都有点违背。
是指请求总的处理时间超过这个timeout后,就不再进行重试
from higress.
@SpecialYang 我们在文档中说明下,proxy-next-upstream-timeout 这个注解和nginx的差异,并告知用户如果在配置基于超时重试时,必须做此配置,并配置的比higress.io/timeout的值要小
https://higress.io/zh-cn/docs/user/annotation-use-case#%E9%87%8D%E8%AF%95
如跟 @SpecialYang 线下沟通,这里如果完全兼容 nginx ingress,可能导致开启基于 timeout 做重试时,引入重试风暴的问题,nginx ingress 目前的默认配置也有这样的隐患。所以我们不再考虑这个功能完全兼容。
对于 proxy-next-upstream-timeout 这个注解的名字来说,当作是每次重试的 timeout,从字面理解上也是更合理的,符合用户直觉
from higress.
Related Issues (20)
- 用kubesphere安装higress时一直加载 不确定是kubesphere的问题还是helm的问题
- Issue: About Higress syncing Nacos service list delay problems HOT 3
- helm安装方式, higress-console控制台服务列表没有higress所在命名空间的服务 HOT 3
- bug: kube-load-image always run fail HOT 2
- proxy js file failed HOT 36
- higress项目执行make build命令,编译报错 fatal: Authentication failed for 'https://github.com/mitchellh/osext/' HOT 3
- higress支持Apollo配置中心 HOT 1
- higress支持对接非K8s服务实现TCP协议转发 HOT 1
- waf 开启观察模式某些请求无法正确响应 HOT 3
- Optimize the e2e testing framework to support testing of resource modifications
- http头重复设置在Higress下会报415(Invalid mime type...),而在ingress controller下是正常的 HOT 1
- 无法返回自定义HTTP状态码 HOT 4
- 自定义应答插件不能正常设置Content-Type HOT 3
- 建议公开监控面板的指标采集规则 HOT 2
- console支持配置多个目标服务 HOT 5
- Add support of `try_files` usage HOT 8
- 支持SSL证书共享 HOT 4
- 如果使用higress,对外暴露多个端口(listener),每个listener进行不同的[证书]配置。 HOT 11
- higress是否不支持类似nginx的proxy_cookie_path指令? HOT 1
- 支持多个k8s集群service发现
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from higress.