-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add circuit breaking (immediately scale to 0) on specific Trigger #3949
Comments
hi @kencieszykowski |
Appreciate the link there-- I see it as a slightly different use-case. The issue with that is that it would require manual intervention (or middleware) to pause autonomously. Ideally, there could be a specific Trigger/metric that we could monitor that would automatically inject this annotation into the We're trying to catch those times where metrics indicate poor performance (and the immediate need for a shutdown), and no human intervention is involved to stop things in their tracks. |
💯, we should provide automation for this.
I don't think it does, because the ask is to scale to 0 if a given threshold is met. I'm not completely sure if the model should be based on scaler though. I do see why it could be an approach but typically you'd check a metric on something different from what you are scaling. Taking the example in the request:
Here the circuit is meant to be broken if the DLQ is getting messages, while the app typically is interested in the main queue. So I'm wondering if we should support multiple providers such as Prometheus metric, metric API and potentially talking to dependencies but not through the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Most definitely-- I think rolling out to the individual Scalers could happen over time, but Prometheus, metric API and Datadog would provide a huge benefit here. Since posting this I've come up with a slightly different workflow using KEDA that automates a circuit breaker effect, but it seems like all of the pieces are in place within Keda to allow something like this. Not a great feature for a large amount of people, but for some, I think it would be a big feature. |
Interesting, so how does it work then? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed due to inactivity. |
I think this is somewhat related with this issue: #1932 I think it would be quite usefull to scale down a workload to avoid doing a lot of work that is most likely going to fail. |
I agree |
I think that both can be done with this feature: #4583 (not merged yet) |
That's fine, but I personally believe this is only the first step and we should improve it further so that nobody has to writes expressions for this scenario |
I wouldn't add 2 ways for doing the same tbh, I think that documenting the way to go with examples is better than having more than 1 way to do the same (having to support all of them) |
One can build on the other. End-users writing custom formula's should really be a last resort as it's not straight forward unless what you know you are doing. Because of that, we should streamline the experience for end-users and maybe use custom formula's under the hood (which end-user does not care about, just get it done). |
@kencieszykowski Close this? Should be implementable with modifiers formula and activationTarget. If so, I suggest adding an example to the docs or FAQ. |
Formulas are nice, but maybe it should be more simple to use it though? |
Proposal
Proposing a circuit breaking feature for Keda. Effectively, if a specific
circuitBreak
trigger crosses a threshold, it overrides the other triggers and scales the Deployment/ReplicaSet/StatefulSet down to 0.This would be useful in situations where some microservice upstream or downstream releases bad data into the target process; effectively stopping the data transmission at the top of the funnel.
Possible recovery options could include:
circuitBreak
threshold is under the target valueUse-Case
For example, we have a Kafka stream worker that ingests messages and pushes them downstream to APIs and Seldon models. We have implemented a dead letter queue; and if the target rate of messages going to the dlq is above a certain threshold, we would like to stop the stream worker in its' tracks.
Anything else?
There are other ways to do this using Istio and various other tooling; but Keda would offer much more flexibility than what I have seen.
The text was updated successfully, but these errors were encountered: