[To be split] Make broker ingress/filter be able to use knative service#2425
[To be split] Make broker ingress/filter be able to use knative service#2425yolocs wants to merge 11 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yolocs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test pull-knative-eventing-unit-tests |
|
/test pull-knative-eventing-integration-tests |
|
How do you suggest that we coordinate serving and eventing releases if this were to be merged? |
Not sure what caveats are there. I'd imagine that eventing release branch will depend on the same serving release. Thoughts? |
I don't think there's a good way to do it that doesn't complicate the release process and life for users, which is why I have been against adopting a dependency on serving in the past. Is there a way to accomplish this without taking the dependeny? |
|
The dependency is on the serving APIs. So there is no need to align the release. Eventing can always use the previous serving release. |
|
Given that we are already betting that folks are going to plug in alternate Brokers and Channels, let's lean into that. What Eventing needs upstream is a reference implementation, which validates the semantics for the purposes of establishing conformance. We should separate that broker implementation like we do the in-memory-channel, so that folks can opt out. Honestly, having just done this for Ingress, nothing keeps you more honest about conformance than having to write the second thing, it really builds empathy for folks trying to integrate :) I really dislike the idea of adding a moving part that toggles between serving/other based on what's installed (same goes for KEDA). If Serving is the right tool for a particular implementation of the abstraction, then that implementation should bet on it, but it should probably live out-of-tree. To clarify: I don't think that all we should provide out-of-the-box is a toy, but maybe that's all we have in Eventing proper? |
|
Could you be more specific about the complication you see? Especially for
the users. Knowing the exact problems would help we evaluate whether the
effort is worthy.
…On Thu, Jan 23, 2020, 6:51 AM Paul Morie ***@***.***> wrote:
Thoughts?
I don't think there's a good way to do it that doesn't complicate the
release process and life for users, which is why I have been against
adopting a dependency on serving in the past. Is there a way to accomplish
this without taking the dependeny?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2425?email_source=notifications&email_token=ADLPNFOXPNFXIV2DFXNDVBTQ7GVGNA5CNFSM4KKLPH7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJXTTRA#issuecomment-577714628>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLPNFLZE6TSVA4KVIGRXHDQ7GVGNANCNFSM4KKLPH7A>
.
|
For the time being, as we're defining the broker conformance, we also need to work on a reference broker implementation that's production ready. It might not eventually belong to the eventing core repo (like you did for KIngress). IMO at the moment we can stage the work in the eventing core repo and later (once the broker conformance gets maturer) we can move it out. |
+1 to @yolocs comment. I think we shouldn't be blocked on the Broker conformance conversations. From past experience, those conversations take quite sometime, and we might not even reach a consensus in 0.13, although I hope we do. Given that folks have different opinions about the serving dependency, I think this is an excellent time to leverage all the great performance work that the folks in the community (e.g., @slinkydeveloper, @chizhg, @grantr, etc) have been doing. We should base our decision on data. If you can show that this change improves the throughput by some x, that events are not dropped due to the broker ingress pod being restarted when is bombarded, etc., then I think it will be a no-brainer... |
|
@nachocano I agree with the pragmatic vision of watching for data, but I'm skeptic that implementing the broker scale up gives a significative boost on performance. In my opinion we should work on several steps first:
If we don't work on the first problem, then you're scaling something inefficient and the result will create just more traffic. Anyway, I would be really glad to help testing the proposed solutions to check how they perform better than the actual code. |
Are you suggesting Eventing Core should only contain a reference implementation (aka a toy)? Are you suggesting an optimized and scalable broker implementation should live somewhere else (like eventing-contrib)? |
There is no denying we also need to scale channels. And It's exciting to see you're actively working on scaling channels (starting with cloudevents sdk-go). But the work to scale the current broker implementation doesn't conflict with scaling channels. @grac3gao is also working on performance tests to see how much we can gain from ksvc. |
I don't think the reference implementation should be a toy. To me, it's desirable to have a strong reference implementation that users can just grab and go. Introducing ksvc as a code dependency doesn't seem to be a strong enough argument to move the broker reference implementation out of the eventing core. |
|
Pending #2451 for this PR to be ready. |
|
The following is the coverage report on the affected files.
|
| branch = "master" | ||
|
|
||
| [[override]] | ||
| name = "knative.dev/serving" |
|
There are a lot of comments here, let me try to add some notes.. I agree with several folks that the "reference implementation" that comes with "CORE" should not be a toy. We should aim for some good and solid implementation. Would it be that bad if the RI depends on the API of Knative Serving (not an exact version)? that way we could have a more serverless approach of a broker. Alternative brokers could be living in some other repo... However, with alternative impl. of the broker I think we should perhaps consider what @n3wscott suggested to get rid of exposing the channel IMPL details .... |
|
Additional point....
So, that would be perhaps another moving part? and perhaps we should get the current broker done as a solid foundation, and why not move the Now, in order to easily plug-in other IMPLs. should the broker move to be some generic API, with a default IMPL, like we have w/ the IMC on the "eventing core" repo? and a KsvcBroker could be in the repo? IMO that would also validate the API of the Broker itself, and ensure its conformence ? |
|
I like @matzew suggestion. On one hand, I understand why users want scale to 0 semantics as you mentioned for your demo, but on another I’ve the feeling that we’re cramming more moving parts without solidifying the foundations first. IMHO it would have made sense if the current implementation was more time tested and stable with less “fundamental” problems than it has now (checkout #2460 ), then we come to the point where we know it needs autoscaling (to 0 and up ) and we’d know what is it excatly improving. |
|
I want to pop up a level because I think we're debating one half of the dichotomy here. We want However, if the default Broker simply ran as a multi-tenant component, then the proliferation and scale questions get a lot easier, at the cost of having to deal with multi-tenancy. It would be relatively straightforward to replace the sole-tenancy deployments with ExternalName services that route through a multi-tenant deployment that dispatches on Host. I illustrated this here My $0.02: I'd rather see us pursue the latter in-tree, with an out-of-tree implementation that uses Serving (and KEDA) to achieve sole-tenancy and scale. |
|
I agree with everything but I have some concerns about this:
I'm worried about the "out of tree, out of sight", and that each vendor is going to work their own optimized implementation. Any thoughts on that? |
I'd think that "out of tree" here means |
|
Yeah, I don't mean out-of-org, just out-of-tree. We want the core of eventing to avoid a serving dependency. FWIW, I just shared a (maybe) crazy idea in #networking for how we might optimize things 😎 |
|
BTW most components are already multi-tenant by using ExternalName services. AFAIK, Only the broker is not. |
@matzew To me, this is NOT another KsvcBroker. The essence of this broker is still the same - ingress + channel + filter. It provides a podspec expect an addressable service. To have it in
@Abd4llA There is no denying there are a lot of things to improve (and scaling is one of them). To me, some of of these "fundamental" problems may not be solved with this broker implementation. But scaling is definitely one we can solve. Unless you think this change has conflicts with these future improvements, I don't see why we shouldn't go for it.
@mattmoor Like you said, what you suggested is only good for certain use cases (when isolation is not a need). I don't understand why we can't solve both use cases (isolation and non-isolation) with this change. |
|
In the past I've heard knative components described as being loosely coupled so that we can use individual pieces of knative and aren't forced to use every component. Doesn't this PR landing in eventing core (vs eventing contrib) dilute the decoupled characteristic of knative? |
Does different broker implementations (https://docs.google.com/document/d/1pBLkMptwbdEHUgjn1K5Obf7Xe-G9PFGChQcDCZE9vMQ/edit?ts=5dec0d81#) meet the "decoupled characteristic"? To me the eventing API is the essence of decoupling interface from implementation. |
|
@yolocs is it possible to implement the necessary hooks in |
I can give it a try. Stay tuned. |
|
@yolocs any progress on the split? |
|
@yolocs: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes #2301
The behavior would be: add env
BROKER_RESOURCE_FLAVOR=knativeto create broker resources (ingress/filter) as knative services. If the serving is not installed, the controller will fail to start. Without this env, the controller will still use svc+deployment for ingress/filter.Most files are vendored serving code. Files in eventing that are meaningfully changed:
Proposed Changes
Release Note