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

downstream circuit breakers #373

Closed
2 tasks
mattklein123 opened this issue Jan 24, 2017 · 15 comments
Closed
2 tasks

downstream circuit breakers #373

mattklein123 opened this issue Jan 24, 2017 · 15 comments
Assignees
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Milestone

Comments

@mattklein123
Copy link
Member

mattklein123 commented Jan 24, 2017

2 different levels:

  1. Phase 1, don't do keep alive (for example in HTTP connection manager filter).
  2. Phase 2, immediately close connections when they are received.

Remaining items:

  • Stats
  • Docs
@mattklein123 mattklein123 added the enhancement Feature requests. Not bugs or questions. label Jan 24, 2017
@rshriram
Copy link
Member

Can you elaborate phase 2 please? Circuit breakers as such makes sense when calling dependencies. At downstream level, its more of handshaking pattern (assuming the other end is Envoy). If not, it boils down to throttling/load shedding does it?

@mattklein123
Copy link
Member Author

This is primarily for Envoys that are acting as edge proxies. It's a defense in depth measure to help with too many incoming connections. The 2 phase approach allows it to be graceful in phase 1 before becoming "shed load as fast as possible" in phase 2.

@mattklein123
Copy link
Member Author

@dnoe assigning to you.

@mattklein123 mattklein123 modified the milestone: 1.4.0 May 19, 2017
@mattklein123 mattklein123 modified the milestones: 1.4.0, 1.5.0 Jul 21, 2017
@mattklein123 mattklein123 removed this from the 1.5.0 milestone Oct 19, 2017
@mattklein123 mattklein123 added the help wanted Needs help! label Dec 25, 2017
@spgyip
Copy link

spgyip commented Mar 26, 2018

We are facing the 'too many open files' problem as an edge proxy, which is the same problem as this issue.

We have built an gRPC service mesh with envoy in our system, and we use a front envoy(as edge) routing client side gRPC requests.

I wonder how do you solve this scenario in your solution? Using some else h2-proxy, etc, nginx?

However, I prefer to use a global unified solution.

@alyssawilk
Copy link
Contributor

Ah, a third phase of this would be when over [a configured file descriptor limit?] to simply stop accepting new incoming connections. It's drastic, but better than crashing when under DoS attack, and will likely be implemented as part of this issue.

@mattklein123
Copy link
Member Author

@anticpp I will say that in general, incoming connections can be generally controlled pretty well by having appropriate upstream circuit breakers, downstream idle timeouts, and a high enough FD limit for the process.

With that said, I would love to make progress on this issue, but it hasn't gotten resourced yet.

@alyssawilk
Copy link
Contributor

I believe our team plans to pick it up in Q2

  1. feel free to beat us to it and
  2. please don't bet your production environment on it!

@eziskind
Copy link
Contributor

Here's a draft design doc for an "Overload Manager" component for Envoy that would help address this: https://docs.google.com/document/d/1NXHAYibd6N7B4PVrukhACqzNK7WUZHWDSil9maeG1c8/edit?usp=sharing

Comments welcome!
@mattklein123 @htuch @alyssawilk

@htuch
Copy link
Member

htuch commented Jun 29, 2018

LGTM; left some minor comments on the doc but the overall design looks very solid.

@mattklein123
Copy link
Member Author

+1 this looks great.

eziskind added a commit to eziskind/envoy that referenced this issue Jul 12, 2018
to be used by the overload manager (issue envoyproxy#373)

Signed-off-by: Elisha Ziskind <eziskind@google.com>
htuch pushed a commit that referenced this issue Jul 19, 2018
Add an extensible resource monitor framework for monitoring resource "pressures" (usage/limit). This will be used by the overload manager to implement downstream circuit breaking (issue #373 - see design doc linked from there).

Risk Level: low (not yet used in envoy main)

Signed-off-by: Elisha Ziskind <eziskind@google.com>
@mattklein123
Copy link
Member Author

@eziskind I add stats/docs open items to the issue description for tracking.

htuch pushed a commit that referenced this issue Aug 7, 2018
Initialize on startup and add documentation (issue #373)

Risk Level: low
Testing: unit tests
Docs Changes: add docs for overload manager

Signed-off-by: Elisha Ziskind <eziskind@google.com>
@eziskind
Copy link
Contributor

eziskind commented Aug 7, 2018

Remaining item is to implement overload actions in the connection manager.

htuch pushed a commit that referenced this issue Aug 12, 2018
Lookups in this cache can be used as an alternative to registering a callback for overload action state changes. Useful for objects (like the http connection manager) with dynamic lifetimes that are created after envoy initialization - currently callback registration must be done during initialization and there isn't support for unregistration. Those restrictions could be relaxed if we need to in the future but for now this keeps things simpler. For issue #373.

Risk Level: low
Testing: unit tests

Signed-off-by: Elisha Ziskind <eziskind@google.com>
zuercher pushed a commit that referenced this issue Sep 14, 2018
Add an overload action in the http connection manager to immediately close new streams in case of envoy overload (issue #373).

Signed-off-by: Elisha Ziskind <eziskind@google.com>
@mattklein123 mattklein123 added this to the 1.9.0 milestone Sep 27, 2018
@mattklein123
Copy link
Member Author

@eziskind should we close this issue as complete and track further work in new issues? I think the main feature is done?

@eziskind
Copy link
Contributor

eziskind commented Oct 5, 2018

@mattklein123 I'm working on overload action to stop accepting new network connections, mentioned in this comment. After that I think we can call this done.

@mattklein123
Copy link
Member Author

Per previous comment, calling this done. We can track further overload actions in new issues.

rshriram pushed a commit to rshriram/envoy that referenced this issue Oct 30, 2018
…roxy#373)

* Changed the type of init_service_configs and added rollout_id

* Renamed to service_config_rollout. Added getter and setter of current_rollout_id_
jplevyak added a commit to jplevyak/envoy that referenced this issue Jan 22, 2020
Add foreign function support to Wasm.
wolfguoliang pushed a commit to wolfguoliang/envoy that referenced this issue Jan 23, 2021
…-filter

zh-translation:docs/root/configuration/other_protocols/thrift_filters…
jpsim pushed a commit that referenced this issue Nov 28, 2022
Adds 2 new jobs that build the Swift and Objective-C demo apps on CI.

Note that the `Envoy.framework` artifact has to be zipped during upload and unzipped during download since the upload/download GitHub actions seem to use the _contents_ of `Envoy.framework` instead of the whole folder (and thus incorrectly end up with the contents of `Envoy.framework` in `dist/` after downloading instead of an `Envoy.framework`).

These will be used to validate that the demos continue to work properly.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this issue Nov 29, 2022
Adds 2 new jobs that build the Swift and Objective-C demo apps on CI.

Note that the `Envoy.framework` artifact has to be zipped during upload and unzipped during download since the upload/download GitHub actions seem to use the _contents_ of `Envoy.framework` instead of the whole folder (and thus incorrectly end up with the contents of `Envoy.framework` in `dist/` after downloading instead of an `Envoy.framework`).

These will be used to validate that the demos continue to work properly.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
Development

No branches or pull requests

7 participants