Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Update (rewrite) overview, motivation, and data plane #24
Update (rewrite) overview, motivation, and data plane #24
Changes from 2 commits
8ef8f61
0a33307
6216969
e776f36
5d0c5b4
0a54751
07fcbde
917eac3
7bd0161
fae7a87
9e33332
ea4f14c
1797c7e
8c870de
693cce6
3a9519f
9b97e59
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might be good to stick with consistent terms and not introduce "event processor" as an alternative for "receiver".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, it actually means:
That's a little longer than "each event processor is actively responsible for an event", but maybe it's clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what it means to say that a "receiver is responsible for an event". What are the responsibilities implied by that statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my previous comment. It's like "hot potato" -- you're responsible for not dropping the potato until you hand it to someone else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should remove this sentence, It doesn't make sense to me to describe the spec future inside the spec itself. Maybe we can have such claims somewhere else, but not in the spec.
Maybe just keep:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this so that readers of the specification would be aware when building compatible implementations. Since we don't have a separate version number, it's possible that an implementation built against this specification might be run against a future specification which would offer extra fields. The (older) implementation should not reject the event because of additional fields that it doesn't understand.
(For example, if the
Upgrade
header is used, the older implementation should just ignore the protocol upgrade offer.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, but what you're talking about is a concern of the future spec, not of the existing one: when we're going to add such mechanisms, we need to make sure they'll be backwards compatible, in the sense that old implementations should still work properly.
On the other hand, this sentence sounds wrong, because we're saying in the spec what the future of the spec might look like, which is just going to confuse the reader that needs to implement the spec today. And also, what if we're never going to keep this promise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's important for implementers to realize that there may be future-compatible extensions. How about the following language:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wording you proposed is definitely better, but it still doesn't sound right to me writing such "future proof" sentence inside the spec. I prefer just keeping the first sentence of this new wording, but it's ok if you want to have all the text block.
For me from Future versions onward should go in a doc like a primer: #24 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New term "recipients"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I use recipient 17 times, and receiver 5 times. Switched receiver to recipient unless you prefer the other way around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either is fine, I'm more interested in consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this: https://github.com/knative/eventing/blob/main/pkg/kncloudevents/message_sender.go#L192-L202
as a good section on
4xx
errorsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was working off of the following:
https://github.com/knative/specs/blob/main/specs/eventing/data-plane.md#http-support
Which specified 200/202, 404, and 400 (unparseable CloudEvent). This is somewhat contradicted by:
https://github.com/knative/specs/blob/main/specs/eventing/data-plane.md#error-handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to default to 4xx = no retry, should any of following codes be retried?
Currently, the spec specifies:
I interpreted this to mean that 404s were retriable, but the current spec says that every error "may be sent again" (non-spec language), which doesn't really line up with the code implementation.
I've adjusted this to only retry the three codes mentioned and all other 400s are non-retriable, though the 404 case seems strange to me, and I'd love to get more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure on all the "Too Long" things,
Also not sure on
426
, as that indicates the current protocol is refused. I doubt we do upgrade...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think SHOULD may be too strong here. In serving we specifically stopped the networking layer from retrying on 5xx errors because it ended up spamming the ksvc when the ksvc was correctly returning a 503. Even with a MAY I'd still like to see some text that talks about how the sender needs to be selective about it to avoid DDOSing the sink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the mention of congestion control in the next sentence sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good thing to mention, but it still pushes people towards resending... just slower. I keep having flashbacks to wasting my time debugging a ksvc trying to figure out why I was seeing 3 times the errors in its logs... and it was because of the network retries. I think it's sufficient to talk about how it's ok to retry if the sender thinks a new result will happen, but not just because it failed with a 5xx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we can do that later. If you agree, I can create a ticket to define them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, removing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section brings the
Prefer: reply
to a mandatory and I thought before it was more of a "you can provide this, but the sink is free to ignore it, but if you say "Prefer: " and get a reply, you are free to drop the event without warning.This language makes the header mandatory, and it is not used anywhere yet, so it would be an API change for eventing at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this attempts to make the expected behavior for e.g. a receiving function explicit.
I'm willing to change this, but the current formulation implemented in eventing makes it difficult for a function to know if the reply might be dropped, which seems to go against the goal of avoiding message loss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I didn't change this yet, because I'd like to discuss whether it makes more sense to change the contract or the implementation.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, here's some more background on this.
knative/eventing#4560
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the background, and the concern that adding
MUST
language around this header would make previous versions of Knative incompatible with the 1.0 spec.knative/eventing#4560 (comment)
I'm wondering if we have a requirement that versions of Knative prior to the 1.0 spec
MUST
be compliant? If so, what is our boundary?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this functionality is not written in the reference implementation, I would be inclined to not make it a
MUST
.The original PR was using
SHOULD
andMAY
, noMUST NOT
norMUST
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original PR did not include any MUST clauses.
Unfortunately, I have a conflict with the eventing meeting today (interview); is there a way you could see this becoming a "MUST", or do you think it always needs to be a MAY/SHOULD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see it as always a MAY/SHOULD for 1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what this one is trying to say. Do you mean we can add new sinks into the eventing infra/mesh w/o impacting existing producers and consumers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In particular, this is saying that new event sources and sinks can be connected to the topology without needing to change any code in the producers or consumers.
Compare this with explicitly configuring exchanges in AMQP or topics in Kafka, where consuming from two exchanges or topics would required updating the code to create two subscriptions or consumer groups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use common terms... introducing "consume" in this doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you're suggesting here; in the data plane doc, receiver is being used specifically to refer to the "origin server" side of HTTP, whereas this is intended to speak about the logical connections and flow of events. (All of motivation should use the produce/consume terminology, I think.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have an example of what you had in mind with this last sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Destination/Addressable and the high availability of Channels and Brokers are the two benefits to the event producer side. For the event consumer side, I think the reply pattern and retry policies along with CloudEvents-over-HTTP are the main contributors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm willing to cut this sentence if it doesn't feel like it belongs, though.