-
Notifications
You must be signed in to change notification settings - Fork 117
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
Support configuration of Dispatcher CircuitBreaker #757
Comments
Hi 👋! Thanks for reporting! Do you plan to configure it for each trigger or a global configuration might be enough to start with? Or both? |
I think solving this problem for a global configuration is doable, while for each trigger, I think we need to reason about it: because |
Hi! Thanks for the swift replies I was planning on configuring it globally, I don't think I would need it to be more granular. But certainly, I could see that it might make sense longer-term for it to be an option on the Trigger, or perhaps even both. Such as if the global configuration could be overridden on a per-trigger basis. |
@JackSilk there is also the |
@slinkydeveloper The thing I'm most concerned with configuring is the DEFAULT_TIMEOUT (i.e. https://vertx.io/docs/apidocs/io/vertx/circuitbreaker/CircuitBreakerOptions.html#DEFAULT_TIMEOUT) |
From a quick look (but @pierDipi knows better than me), perhaps that should be -1? Given we already have a bound on the retries, it doesn't seem to me that we need that additional bound too... |
I think it's totally reasonable to ask for this since a subscriber can take longer than
Given the schema above, for some use cases not having this configuration might be a blocker to use this component since you can't make progress due to this (annoying) timeout. With that being said since we're discussing a global configuration, I'm pretty supportive of this feature and it should be relatively simple to implement and maintain: Just like client options taken from the mounted we can use them here (making sure we copy them before changing config based on |
Ahhh gotcha so this timeout is the timeout of a single request, right? If that's the case, I think this should live in delivery spec itself, because it seems an important configuration to me, and it's also very specific to each subscriber: a default one might not fit most use cases where people need to tweak this parameter. It's not specific to this implementation at all and it's a requirement general enough to be valid for every delivery component. |
So, given the response on the upstream issue, do you agree that we can expose this configuration globally with a ConfigMap for now? |
@pierDipi let's wait for it. We won't be able to push this in next release anyway, which is in 1 week, and TBH I'm reluctant to expose this configuration because it might break, given we had several times the discussion on wheter we should continue to use Also please comment in the delivery spec timeout issue if you like it 😄 |
I'm ok with that! |
Ping. I'm ok with exposing vertx circuit breaker config given that is a global configuration and the circuit breaker library is working well. |
Ok, but let's make sure we clarify both in the spec and in the CM itself that this is a super unstable and might break any time config |
@JackSilk does the new |
@slinkydeveloper Sorry for the delay in the reply, yes I think that will work nicely for my use case. Thanks! |
Problem
The HTTP WebClient in the Dispatcher exposes configuration, including various timeouts, via a config map (config-kafka-broker-data-plane, config-kafka-broker-webclient.properties). However the CircuitBreaker which wraps the WebClient doesn't expose its configuration. So even with an infinite HTTP timeout, if the request takes longer than (I think) 10 seconds it'll be killed. I think it would be nice if this, too, were configurable.
Persona:
Which persona is this feature for?
Exit Criteria
The CircuitBreaker can be modified (i.e. timeout set) such that Events that take longer than 10 seconds to complete will be sent correctly
Time Estimate (optional):
How many developer-days do you think this may take to resolve?
Additional context (optional)
The dispatcher gives me an error like this when it times out
I believe the configuration is set here:
data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/http/HttpConsumerVerticleFactory.java:createCircuitBreakerOptions
Since some of the options are currently set through the egressConfig I don't know how it would be best to make it configurable.
The text was updated successfully, but these errors were encountered: