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

Get rid of the concurrent stream limit by advertising a maximum stream ID #419

Closed
marten-seemann opened this issue Mar 29, 2017 · 8 comments
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.

Comments

@marten-seemann
Copy link
Contributor

We've already had a lot of discussions about the concurrent streams limit, which all brought us back to the problem that at every given moment both peers have to agree about the number of open streams, which seems to require a non-trivial amount of bookkeeping (of ACKs received for all STREAM frames sent on a given stream).

I'd like to propose a different solution, which solves this problem, and has a couple of nice additional properties as well:

A receiver advertises the maximum Stream ID it is willing to accept. The sender is allowed to open all streams that have IDs not larger than this number. The receiver can advertise a higher maximum Stream ID whenever it likes to, by sending a STREAM_LIMIT_UPDATE frame. STREAM_LIMIT_UPDATE is a retransmittable frame that contains a single value, the maximum Stream ID.
Note that conceptually, this is similar to advertising a flow control offset (and the rules for STREAM_LIMIT_UPDATEs would be similar to those for WINDOW_UPDATEs).

An implementation is free to choose any algorithm to determine which maximum Stream ID it advertises. The number of open streams may be used, but I can think of a couple of other ways to limit the state a peer can create. It would even be possible to advertise different limits depending on the server load.

@lucas-clemente
Copy link
Contributor

Note that GOAWAY (at least with its current semantics) could then just be a special case of this STREAM_LIMIT_UPDATE frame.

@RyanTheOptimist
Copy link
Contributor

RyanTheOptimist commented Mar 29, 2017 via email

@MikeBishop
Copy link
Contributor

Sold. Working on a PR now. ;-)

@ianswett
Copy link
Contributor

Nice suggestion.

I would expect it to be illegal to reduce the max stream id, but that's exactly what one might want to do with GOAWAY. Thoughts?

@MikeBishop
Copy link
Contributor

There's still a place for an application-level signal -- you stop sending updates, but the other side needs to know whether they're just being throttled or asked to roll over to a new connection.

@mcmanus
Copy link
Contributor

mcmanus commented Mar 29, 2017 via email

@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -transport labels Apr 18, 2017
@siyengar
Copy link

I like this. This solves my issue here #432 as well. I raised the same issue on the list and this was my conclusion as well that we need a window_update like mechanism for stream limits.

@martinthomson
Copy link
Member

Closed with #421.

@mnot mnot added the has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. label Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects
None yet
Development

No branches or pull requests

9 participants