Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My Envoy gateway tcp proxy max connections too low,what's the problem? #33723

Closed
chunhanRyan opened this issue Apr 22, 2024 · 6 comments
Closed
Labels
area/circuit_breaker question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@chunhanRyan
Copy link

chunhanRyan commented Apr 22, 2024

When the Envoy is started in static configuration mode, the maximum number of connections can only reach about 1024.
Envoy version is :1.25.11, The configuration like:

admin:
  address:
    socket_address: { address: 0.0.0.0, port_value: 9902 }
static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address: { address: 0.0.0.0, port_value: 20000 }
    filter_chains:
    - filters:
      - name: envoy.filters.network.tcp_proxy
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
          stat_prefix: tcp_local_service
          cluster: some_service
  clusters:
  - name: some_service
    connect_timeout: 0.25s
    type: STATIC
    lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: some_service
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 66.66.10.196
                port_value: 80
        - endpoint:
            address:
              socket_address:
                address: 66.66.10.195
                port_value: 80
layered_runtime:
  layers:
  - name: static_layer_0
    static_layer:
      envoy:
        resource_limits:
          listener:
            listener_0:
              connection_limit: 200000
      overload:
        global_downstream_max_connections: 200000

I use a client to test envoy supported max keepalived connections with 2000 connection (i changed the linux process max open file,and local port ....), but i can only reach max 1024 active connection with envoy admin stats interface,
image
Instead, the max connctions can be 100k+ or more when use envoy.filters.network.http_connection_manager. Is there any key different reason?

@chunhanRyan chunhanRyan added the triage Issue requires triage label Apr 22, 2024
@chunhanRyan chunhanRyan changed the title My Envoy gateway tcp proxy max connections too low,how to change? My Envoy gateway tcp proxy max connections too low,what's the problem? Apr 22, 2024
@pxpnetworks
Copy link

please check if you are hitting the some_service cluster's circuit breaker defaults

@wbpcode
Copy link
Member

wbpcode commented Apr 23, 2024

An upstream connection is holded by one downstream connection in the TCP proxy. (HCM use a shared connection pool).
So, the circuit breaker configuration (default allow 1024 max connections) of upstream cluster will limit the max connection of downstream listener.

@wbpcode wbpcode added question Questions that are neither investigations, bugs, nor enhancements area/circuit_breaker and removed triage Issue requires triage labels Apr 23, 2024
@chunhanRyan
Copy link
Author

chunhanRyan commented Apr 23, 2024

@pxpnetworks @wbpcode thx, I changed the configuration with high circuit breaker limit,it works.

@derekargueta
Copy link
Member

close issue?

Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label May 24, 2024
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/circuit_breaker question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

4 participants