Search code examples
kubernetesenvoyproxy

Tried to use the new envoy.resource_monitors.downstream_connections parameter in Envoy version 1.30.2 but it's failing


Replace the outdated values for "overload" { "global_downstream_max_connections" : 5000} with the most recent envoy.resource_monitors.downstream_connections, as shown below: however, it repeatedly displays the same warning message. Envoy json file

{
  "admin": {
    "access_log": [
      {
        "typed_config": {
          "@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
          "path": "{{ envoy_log_dir }}/access.log"
        }
      }
    ],
    "profile_path": "{{ envoy_log_dir }}/envoy.prof",
    "address": {
      "socket_address": {
        "address": "127.0.0.1",
        "port_value":  800
      }
    }
  },
  "layered_runtime": {
    "layers": [
      {
        "name": "static_layer_0",
        "static_layer": {
          "envoy": {
            "resource_monitors": {
              "downstream_connections": {
                "max_active_downstream_connections": 5000
              }
            }
          }
        }
      }
    ]
  },

Warning message:

[2024-06-18 11:01:12.799][8][warning][main] [source/server/server.cc:928] There is no configured limit to the number of allowed active downstream connections. Configure a limit in envoy.resource_monitors.downstream_connections resource monitor.

What can I try next here?


Solution

  • Json file has to be corrected like this :

    {
      "admin": {
        "access_log": [
          {
            "typed_config": {
              "@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
              "path": "{{ envoy_log_dir }}/access.log"
            }
          }
        ],
        "profile_path": "{{ envoy_log_dir }}/envoy.prof",
        "address": {
          "socket_address": {
            "address": "127.0.0.1",
            "port_value": 800
          }
        }
      },
      "overload_manager": {
        "resource_monitors": [
          {
            "name": "envoy.resource_monitors.global_downstream_max_connections",
            "typed_config": {
              "@type": "type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig",
              "max_active_downstream_connections": 50000
            }
          }
        ]
      },