更新时间:2024-01-24 GMT+08:00
网关如何配置最大并发流max_concurrent_streams
- 登录网关所在的集群任意节点执行以下命令,创建资源。
cat>"stream-limit-envoyfilter.yaml"<<EOF apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata: name: http2-stream-limit namespace: istio-system spec: workloadSelector: labels: istio: ingressgateway configPatches: - applyTo: NETWORK_FILTER # http connection manager is a filter in Envoy match: context: GATEWAY listener: filterChain: filter: name: "envoy.filters.network.http_connection_manager" patch: operation: MERGE value: typed_config: "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager" http2_protocol_options: max_concurrent_streams: 128 EOF
max_concurrent_streams即控制网关最大并发流参数,您可以根据需要进行配置。
- 执行kubectl apply -f stream-limit-envoyfilter.yaml创建envoyfilter。
父主题: 流量治理