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

Update to SwiftNIO HTTP/2 1.13.0 #922

Merged
merged 1 commit into from
Aug 7, 2020
Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Aug 6, 2020

Motivation:

The multiplexer from SwiftNIO HTTP/2 required that the first write on
each stream matched the order in which the streams were created.
Violating this led to a connection error; all in-flight and subsequent
RPCs on that connection would fail. Some of our users noticed this
(#912). SwiftNIO HTTP/2 recently reworked the API around how streams
are created: HTTP/2 stream channels are no longer created with a stream
ID and now deliver the frame payload to the channel pipeline rather than
the entire HTTP/2 frame. This allows for a stream ID to be assigned to a
stream when it attempts to flush its first write, rather than when the
stream is created.

Modifications:

  • Increase the minimum HTTP/2 version to 1.13.0
  • Move away from deprecated APIs: this required changing the inbound-in
    and outbound-out types for _GRPCClientChannelHandler as well as a
    few smaller changes elsewhere.

Result:

Motivation:

The multiplexer from SwiftNIO HTTP/2 required that the first write on
each stream matched the order in which the streams were created.
Violating this led to a connection error; all in-flight and subsequent
RPCs on that connection would fail. Some of our users noticed this
(grpc#912). SwiftNIO HTTP/2 recently reworked the API around how streams
are created: HTTP/2 stream channels are no longer created with a stream
ID and now deliver the frame payload to the channel pipeline rather than
the entire HTTP/2 frame. This allows for a stream ID to be assigned to a
stream when it attempts to flush its first write, rather than when the
stream is created.

Modifications:

- Increase the minimum HTTP/2 version to 1.13.0
- Move away from deprecated APIs: this required changing the inbound-in
  and outbound-out types for `_GRPCClientChannelHandler` as well as a
  few smaller changes elsewhere.

Result:

- RPCs can be created concurrently without fear of violating any stream
  ID ordering rules
- Resolves grpc#912
@glbrntt glbrntt requested a review from Lukasa August 6, 2020 15:54
@glbrntt glbrntt merged commit 46d1a29 into grpc:main Aug 7, 2020
@glbrntt glbrntt deleted the gb-update-h2 branch August 7, 2020 07:58
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Aug 7, 2020
glbrntt added a commit to glbrntt/grpc-swift that referenced this pull request Aug 21, 2020
Motivation:

In grpc#922 we adopted some changes from NIO HTTP/2: our handlers now speak
in terms of `HTTP2Frame.FramePayload` rather than `HTTP2Frame`. We
forgot to update our benchmarks at that time.

Modifications:

- Speak in `HTTP2Frame.FramePayload`s in embedded client benchmarks
- Fix up a couple of typos in benchmark names

Result:

Benchmarks work.
@glbrntt glbrntt mentioned this pull request Aug 21, 2020
Lukasa pushed a commit that referenced this pull request Aug 24, 2020
Motivation:

In #922 we adopted some changes from NIO HTTP/2: our handlers now speak
in terms of `HTTP2Frame.FramePayload` rather than `HTTP2Frame`. We
forgot to update our benchmarks at that time.

Modifications:

- Speak in `HTTP2Frame.FramePayload`s in embedded client benchmarks
- Fix up a couple of typos in benchmark names

Result:

Benchmarks work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

concurrent requests cause StreamIDTooSmall error, channel state becomes transientFailure
2 participants