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

Global downstream connection limits. #1966

Closed
Tracked by #1048
arkodg opened this issue Oct 14, 2023 · 8 comments · Fixed by #3082
Closed
Tracked by #1048

Global downstream connection limits. #1966

arkodg opened this issue Oct 14, 2023 · 8 comments · Fixed by #3082
Assignees
Labels
help wanted Extra attention is needed
Milestone

Comments

@arkodg
Copy link
Contributor

arkodg commented Oct 14, 2023

Add a overload manager configuration to limit the total number of downstream connections
https://www.envoyproxy.io/docs/envoy/latest/configuration/operations/overload_manager/overload_manager#limiting-active-connections

@arkodg arkodg added this to the 0.6.0-rc1 milestone Oct 14, 2023
@arkodg arkodg added the help wanted Extra attention is needed label Oct 14, 2023
@tmsnan
Copy link
Contributor

tmsnan commented Oct 17, 2023

@arkodg
Copy link
Contributor Author

arkodg commented Oct 17, 2023

@tmsnan im fine waiting, but atm we dont have any way of enabling overload manager

@tmsnan
Copy link
Contributor

tmsnan commented Oct 18, 2023

@arkodg If possible, I could first add other overload manager features that are already fully supported.

@arkodg
Copy link
Contributor Author

arkodg commented Oct 18, 2023

@tmsnan sure, imo the others like heap size based will require an API addition, putting the burden of getting it right on the user .
Was trying to use this GH issue to enable sensible defaults

@tmsnan
Copy link
Contributor

tmsnan commented Oct 18, 2023

@arkodg Maybe we can refer to Google VRP edge server configuration.

overload_manager:
  refresh_interval: 0.25s
  resource_monitors:
  - name: "envoy.resource_monitors.fixed_heap"
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
      # TODO: Tune for your system.
      max_heap_size_bytes: 2147483648  # 2 GiB
  actions:
  - name: "envoy.overload_actions.shrink_heap"
    triggers:
    - name: "envoy.resource_monitors.fixed_heap"
      threshold:
        value: 0.95
  - name: "envoy.overload_actions.stop_accepting_requests"
    triggers:
    - name: "envoy.resource_monitors.fixed_heap"
      threshold:
        value: 0.98

https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/edge#best-practices-edge

type overloadManager struct {	
	MaxHeapSizeBytes int64
}

Gateway will use overloadmanage (passing envoy configuration similar to Google VRP edge server configuration) when configuring overloadManager's MaxHeapSizeBytes, otherwise it will not be enabled. Is this method OK?

@arkodg
Copy link
Contributor Author

arkodg commented Oct 18, 2023

yes this is the one I was referring to, which will require an API change, but we need to have a simple recommendation for the user for a value to set in this API. e.g. Use this value to set the approximate fixed heap value of your system, you can find that out by running this command "TODO"

@arkodg
Copy link
Contributor Author

arkodg commented Feb 26, 2024

suggest using the value from best practices doc
https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/edge#configuring-envoy-as-an-edge-proxy

      overload:
        global_downstream_max_connections: 50000

@shahar-h
Copy link
Contributor

shahar-h commented Apr 1, 2024

Please assign me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants