envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.28k stars 4.69k forks source link

Cluster upstream_bind_config results in bind failures for many requests #34454

Closed VivekSubr closed 11 hours ago

VivekSubr commented 1 month ago

Title: upstream_bind_config for many requests

Description: I set upstream_bind_config for setting socket options, like so ->

  clusters:
    - name: cluster_0
      connect_timeout: 30s
      load_assignment:
        cluster_name: cluster_0
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address: { address: 127.0.0.1, port_value: 1447 } 
      upstream_bind_config: #options for bind of ephermeral socket used to communicate to endpoint
        source_address: { address: 127.0.0.2, port_value: 9999 }
        socket_options:
        - level: 0        
          name: 1         
          int_value: 64   
          state: STATE_PREBIND  
      typed_extension_protocol_options:
        envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
          "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
          explicit_http_config:
            http2_protocol_options:
              max_concurrent_streams: 1
              initial_stream_window_size: 65536  # 64 KiB
              initial_connection_window_size: 1048576  # 1 MiB

But this results in intermittent bind failures in envoy, [2024-05-31 17:39:52.358][31343][debug][misc] [external/envoy/source/common/network/connection_impl.cc:845] Bind failure. Failed to bind to 127.0.0.2:9999: Address already in use

But I don't really care for the socket being used, why is socket address a required field here? Can we leave it empty to say - "Apply these socket options to any ephermeral socket envoy is using"?

github-actions[bot] commented 1 week ago

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[bot] commented 11 hours ago

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.