gpt4 book ai didi

networking - 如何在 Envoy 中禁用路由超时?

转载 作者:行者123 更新时间:2023-12-04 12:34:46 24 4
gpt4 key购买 nike

我正在尝试使用 http2/grpc 流媒体,但我的连接在 15 秒内中断。 documentationtimeout设置表示将超时设置为 0。但是,当我这样做时,Envoy 在启动时抛出错误,提示 0 不是 Duration 类型的有效值。
如何禁用路由超时?
这是我的 Envoy 配置 .yml

    admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8801

static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 11001
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
http_filters:
- name: envoy.filters.http.router
route_config:
name: grpc_route
virtual_hosts:
- name: grpc_service
domains: ["*"]
routes:
- name: grpc_proxy
match:
prefix: "/"
route:
timeout: 0 # How do I disable the timeout?
auto_host_rewrite: true
prefix_rewrite: "/"
cluster: grpc

clusters:
- name: grpc
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: round_robin
http2_protocol_options: {}
dns_lookup_family: V4_ONLY
load_assignment:
cluster_name: grpc
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: mygrpcservice
port_value: 50061

最佳答案

你几乎明白了。您需要进行的唯一更改是从整数变为持续时间。因此,您需要为零秒指定“0”而不是“0”。
我通过设置 timeout: 0s 验证了这一点在您的 config.yaml 中,一切都启动了。

关于networking - 如何在 Envoy 中禁用路由超时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65897760/

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