gopa
gopa

Reputation: 73

Istio/Envoy: How to configure Envoy connection buffer limits

I asked the question here too https://github.com/istio/istio/issues/33416 - no response so far, if anyone here knows an answer, that would be much appreciated

Istio version is 1.6.4


So by default, envoy seems to buffer up like 256Mb or so per connection (which I dont understand why, makes no sense to me). So for example when I have a scenario like this - client<----istio(k8s cluster)<------speedtest.net - and I do a speedtest, the client to k8s cluster is say 50Mbps, but k8s cluster to speedtest.net can be like gigs of bandwidth. So envoy buffers up like crazy and gets OOM killed eventually.

I understand that envoy filters can be used to change all that, I tried it, I typed all the envoy commands to ensure that the configs are in place, but I still see envoy buffering up and going belly up. The yaml I used is below - I dont care about which port/route it applies to, I want it to apply to ALL connections, 256Mb doesnt make sense for ANY connection ! I have burnt a lot of time on this thing, can someone please tell me what I might be doing wrong ? Also does this need to be done per namespace ?

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: envoy-filter-for-nextensio-global
  namespace: istio-system
spec:
  configPatches:
    - applyTo: CLUSTER
      patch:
        operation: MERGE
        value:
          per_connection_buffer_limit_bytes: 65536
    - applyTo: NETWORK_FILTER
      match:
        listener:
          filterChain:
            filter:
              name: "envoy.http_connection_manager"
      patch:
        operation: MERGE
        value:
          typed_config:
            "@type": "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager"
            http2_protocol_options:
              max_concurrent_streams: 100
              initial_stream_window_size: 65536
              initial_connection_window_size: 65536
    - applyTo: LISTENER
      patch:
        operation: MERGE
        value:
          per_connection_buffer_limit_bytes: 65536

Upvotes: 0

Views: 4189

Answers (1)

gopa
gopa

Reputation: 73

By the way I figured out how to get it working, please see github.com/istio/istio/issues/33416 for the yamls that work fine

Upvotes: 1

Related Questions