Re: Stream limits draft posted

On Tue, Nov 07, 2023 at 04:26:14PM +0100, Martin Thomson wrote:
> On Mon, Nov 6, 2023, at 22:23, Glenn Strauss wrote:
> > Suggestion:
> >
> > Require that client send MAX_STREAMS following client connection preface
> > and SETTINGS to indicate support for MAX_STREAMS.  Since server PUSH is
> > a deprecated feature in HTTP/2, sending MAX_STREAMS 0 would be an
> > indication that the client supports MAX_STREAMS and that the server
> > should produce MAX_STREAMS frames (and that the server should not send
> > PUSH frames unless enabled in SETTINGS and having received a larger
> > value for MAX_STREAMS from client).
> >
> > If a client does support receipt of PUSH, then in addition to receiving,
> > processing, and honoring MAX_STREAMS frames from the server, this would
> > impose client support for *sending* MAX_STREAMS frames to allow server
> > PUSH streams.
> >
> > This suggestion would result in no MAX_FRAMES frames produced by the
> > server unless the server knows that the client supports MAX_STREAMS.
> 
> So the goal is to let both client and server advertise support.  You need both or you don't know which limit you should be policing.  I don't think that we can economize here in the way you suggest.  That is, we already require that endpoints that support this send MAX_STREAMS.  As you say, the server only has to send this once if it finds out that the client doesn't support the feature, and the client only ever needs to send it once, unless it wants server push.  That's pretty cheap.

My mistake.  I had overlooked this in the draft.  Yes, the draft already
requires that client and server send a MAX_STREAMS frame.

While we can not reasonably require that an endpoint send connection
preface, followed by SETTINGS, followed by MAX_STREAMS, maybe we can
require that MAX_STREAMS be sent prior to HEADERS?  An exception would
need to be made for h2c http2-prior-knowledge (or for the now deprecated
Upgrade: h2c)

To save some bytes, should the server be required to send MAX_STREAMS
unconditionally, or can the draft be relaxed to send MAX_STREAMS only
after discovering that the client supports MAX_STREAMS?  Doing so
does not remove discoverability that the server supports MAX_STREAMS
since a client can still discover this by sending MAX_STREAMS itself.

Cheers, Glenn

Received on Wednesday, 8 November 2023 13:16:35 UTC