Help Center/ Application Service Mesh/ FAQs/ Managing Traffic/ How Do I Configure max_concurrent_streams for a Gateway?
Updated on 2024-01-24 GMT+08:00

How Do I Configure max_concurrent_streams for a Gateway?

  1. Log in to any node in the cluster where the gateway is located and run the following command to create resources:

    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

    The max_concurrent_streams parameter indicates the maximum number of concurrent streams of a gateway. You can set this parameter as required.

  2. Run the kubectl apply -f stream-limit-envoyfilter.yaml command to create an EnvoyFilter.