If you use istio version higher than 1.7 you might try use envoy filter to make it work. There is answer and example on github provided by @ryant1986.我们在1.7上遇到了相同的问题,但是我们注意到ISTIO_META_IDLE_TIMEOUT设置仅在输出端而不是输入端被拾取.通过添加一个附加的过滤器,该过滤器应用于请求的INBOUND端,我们能够成功地增加超时时间(我们使用了24小时)We ran into the same problem on 1.7, but we noticed that the ISTIO_META_IDLE_TIMEOUT setting was only getting picked up on the OUTBOUND side of things, not the INBOUND. By adding an additional filter that applied to the INBOUND side of the request, we were able to successfully increase the timeout (we used 24 hours)apiVersion: networking.istio.io/v1alpha3kind: EnvoyFiltermetadata: name: listener-timeout-tcp namespace: istio-systemspec: configPatches: - applyTo: NETWORK_FILTER match: context: SIDECAR_INBOUND listener: filterChain: filter: name: envoy.filters.network.tcp_proxy patch: operation: MERGE value: name: envoy.filters.network.tcp_proxy typed_config: '@type': type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy idle_timeout: 24h我们还创建了一个类似的过滤器以应用于直通群集(因此超时仍适用于我们没有服务条目的外部流量),因为配置也未在其中被拾取.We also created a similar filter to apply to the passthrough cluster (so that timeouts still apply to external traffic that we don't have service entries for), since the config wasn't being picked up there either. 这篇关于1小时后,istio-proxy关闭长时间运行的TCP连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-17 13:26