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

Talk about concurrency in H3 vs. H2 #3114

Merged
merged 4 commits into from
Oct 29, 2019
Merged

Conversation

MikeBishop
Copy link
Contributor

Fixes #2787.

@MikeBishop MikeBishop added editorial An issue that does not affect the design of the protocol; does not require consensus. -http labels Oct 17, 2019
Comment on lines 1817 to 1824
QUIC manages stream concurrency on behalf of HTTP/3. QUIC considers a stream
closed when all sent data and all acknowledgements for received data have been
acknowledged by the peer. HTTP/2 considers a stream closed when the frame
containing the END_STREAM bit has been committed to the transport. As a result,
the stream for an equivalent exchange will remain "active" for at least one
additional round trip. Implementations of HTTP/3 might choose to permit a
larger number of concurrent streams than in HTTP/2 to achieve equivalent
concurrency, depending on the expected usage patterns.
Copy link
Member

@LPardue LPardue Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but if you're gonna pop the bonnet to fix something, I think we probably want to talk about the concurrency of request and push streams separately.

The text here is more focused on describing the behaviour of request streams. So I would be more specific and say that a HTTP/3 server might choose to permit a larger number of concurrent client-initiated bidirectional streams.

Then I would discuss considerations for push concurrency, highlighting the additional controls in the shape of push ID but identifying that push stream concurrency is competing against other unidirectional stream types (core or extensions) for the server-initiated unidirectional stream space.

@@ -1814,6 +1814,15 @@ considerations about exhaustion of stream identifier space apply, though the
space is significantly larger such that it is likely that other limits in QUIC
are reached first, such as the limit on the connection flow control window.

QUIC manages stream concurrency on behalf of HTTP/3. QUIC considers a stream
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this "on behalf of HTTP/3" a bit confusing, because my mental model is that it is generally a responsibility of the transport to manage streams, and that HTTP/2 was the exception.

Maybe something like "In contrast to HTTP/2, stream concurrency in HTTP/3 is managed by QUIC."

@@ -1814,6 +1814,15 @@ considerations about exhaustion of stream identifier space apply, though the
space is significantly larger such that it is likely that other limits in QUIC
are reached first, such as the limit on the connection flow control window.

QUIC manages stream concurrency on behalf of HTTP/3. QUIC considers a stream
closed when all sent data and all acknowledgements for received data have been
acknowledged by the peer. HTTP/2 considers a stream closed when the frame
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence is incorrect.

I think it should be: "QUIC considers a stream closed when all data have been received and all the sent data have been acknowledged."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or a reset has been sent and acknowledged.

acknowledged by the peer. HTTP/2 considers a stream closed when the frame
containing the END_STREAM bit has been committed to the transport. As a result,
the stream for an equivalent exchange will remain "active" for at least one
additional round trip. Implementations of HTTP/3 might choose to permit a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "will typically remain "active" for one additional roundtrip"?

The lifetime of a stream would be indifferent from HTTP/2 in the pathological case where the request-side of the stream is closed after the response-side is being closed.

draft-ietf-quic-http.md Outdated Show resolved Hide resolved
Co-Authored-By: Lucas Pardue <lucaspardue.24.7@gmail.com>
the stream for an equivalent exchange will typically remain "active" for one
additional round trip. HTTP/3 servers might choose to permit a larger number of
concurrent client-initiated bidirectional streams to achieve equivalent
concurrency than were permitted in HTTP/2, depending on the expected usage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"permit a larger number...than were permitted" makes sense, but there are so many words between them that it's kind of hard to parse.

the stream for an equivalent exchange will typically remain "active" for one
additional round trip. HTTP/3 servers might choose to permit a larger number of
concurrent client-initiated bidirectional streams to achieve equivalent
concurrency than were permitted in HTTP/2, depending on the expected usage
Copy link
Contributor

@ianswett ianswett Oct 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
concurrency than were permitted in HTTP/2, depending on the expected usage
concurrency to HTTP/2, depending on the expected usage

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this isn't quite right. It makes an unstated assumption, namely that the transport maintains a fixed "active stream count" that it uses to increment the maximum stream ID. The decision to increase the maximum stream identifier could be made at the same point in HTTP/3 as it is in HTTP/2 if the transport+HTTP stacks were to decide that.

I think that we can stop by saying that the state machine is different and that this might result in HTTP/3 streams being regarded as closed later than in HTTP/2. This could reduce the effective stream concurrency if the number of streams is used in a similar way to decide the maximum stream ID.

@MikeBishop MikeBishop merged commit 44f9d5d into master Oct 29, 2019
@MikeBishop MikeBishop deleted the http/concurrency_differs branch October 29, 2019 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-http editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP/3 has less concurrency than HTTP/2
6 participants