Skip to content
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

Silent close #61

Closed
martinthomson opened this issue Dec 1, 2016 · 8 comments
Closed

Silent close #61

martinthomson opened this issue Dec 1, 2016 · 8 comments
Assignees

Comments

@martinthomson
Copy link
Member

I think that this is one or other peer walking away from a conversation without saying goodbye. If we're going to talk about silent closes, we need to explain what it is, why a peer might choose to do it, and the consequences for everyone involved if they exist.

@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -transport labels Dec 1, 2016
@martinthomson martinthomson added the needs-discussion An issue that needs more discussion before we can resolve it. label Mar 10, 2017
@martinthomson
Copy link
Member Author

It's probably timely that we have the "how do you close a connection" discussion.

@janaiyengar and I were discussing one possibility. In that model, the transport only has an explicit message for error-related closes. The transport also has an idle timer that starts as soon as there are no open streams (note that this means nothing to send, nothing to receive). The connection silently closes if that timer runs down without a new stream being opened.

The application protocol could define a message that could negotiate a graceful close to trigger this. HTTP would need this, otherwise stream 3 would hold the connection open indefinitely. To speed things up, the application protocol could force the timer to be shortened to basically FIN_WAIT2 (a couple of RTOs) by telling the transport that it was done. (You need to wait around a little for retransmissions and reordering.)

@lucas-clemente
Copy link
Contributor

Would PING frames reset this idle timer?

@ianswett
Copy link
Contributor

@lucas-clemente PING frames reset the idle timer today in GQUIC, and that has been useful.

@martinthomson GQUIC currently closes silently by default and does close connections if there are open streams, but only after a PING has already been sent, but not acked. It's possible one can design something better, but I don't think closing the headers(or crypto) streams should be necessary.

@martinthomson
Copy link
Member Author

@ianswett, I suggested closing stream 3 because otherwise the transport has no information about whether the connection is still "in use". That's a consequence of a logical separation of transport and HTTP. If we wanted to avoid that, we would need to identify "static" streams.

@gloinul
Copy link
Contributor

gloinul commented Mar 30, 2017

From today's WG meeting: Martin concluded that he better understand that part of the issue is that Silent Close exists at all.

@martinthomson martinthomson added arch and removed design An issue that affects the design of the protocol; resolution requires consensus. needs-discussion An issue that needs more discussion before we can resolve it. labels Jun 9, 2017
@martinthomson
Copy link
Member Author

@janaiyengar, do you think that you could take lead on writing up a proposal for this? I think that you understand the TIME_WAIT/drain issues better than I do. I will talk to @MikeBishop about how we might better manage graceful shutdown for HTTP.

@janaiyengar
Copy link
Contributor

We should plan to discuss this in Seattle. I'll spin up some text and slides before then so we can kick off discussion on the list.

@martinthomson
Copy link
Member Author

With #721, I believe that we have the ground work in place. It's not perfect, but we should use new issues to discuss any additional changes. (There are already a couple of open issues.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants