-
Notifications
You must be signed in to change notification settings - Fork 146
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
Proposal: FINAL_DATA #2949
base: main
Are you sure you want to change the base?
Proposal: FINAL_DATA #2949
Conversation
This adds a FINAL_DATA capsule type to make clean shutdown explicit.
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 do think we should add a FINAL_DATA. It allows for example sending metadata after the stream is gracefully closed. I can imagine using that to send capsules that contain TCP performance info
Thank you for opening the new issue dedicated to FINAL_DATA.
I think the question is if we would benefit from being able to observe the ordering between close and metadata; if there is, then it makes sense to have a frame indicating close. Otherwise, it is waste, considering that most underlying layers (HTTP/2, HTTP/3, TLS) already provide ways to distinguish between graceful shutdown and abrupt close. For things like performance information, I don't think there would be material difference in sending them right before or after signalling the closure. I'd assume that we would allow such information to be sent at any moment during the lifetime of the tunnel, and that receivers would record whatever they receive. Senders that want to emit most recent information can send performance information at the moment they notice the TCP tunnel getting closed, and close the tunnel. Separately, if we have the interest in sending metadata after closure, I am not sure if such interest applies only to graceful close and not to resets? To paraphrase, it might make more sense to define a frame that conveys closure and how it is closed (i.e., graceful or reset), rather than FINAL_DATA that only signals graceful shutdown. |
What is wasted? This just requires registering a capsule type, which is a 2^62 registry. In most cases, the proxy will send the last bit of data inside a FINAL_DATA capsule. In the unusual scenario where it learns about the FIN after it sent its last DATA capsule, then it does need to send 2 bytes.
FWIW, the lifetime of the tunnel is already somewhat disconnected from the TCP FIN since a FIN only closes one side of the connection. I see a value in telling the peer that TCP closed gracefully while reserving the right to send future capsules in response to something the peer sends.
Having a third capsule like DATA_ABORTED doesn't seem unreasonable to me. |
+1 |
This adds a FINAL_DATA capsule type to make clean shutdown explicit.