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

grpc-js: Refactor Transport and SubchannelConnector out of Subchannel #2308

Conversation

murgatroid99
Copy link
Member

This change refactors the Subchannel class into three classes/interfaces as follows:

  • Subchannel: Abstraction over connections to a specific backend server. Manages connectivity state and connection backoff.
  • SubchannelConnector: manages the process of establishing a connection to a backend.
  • Transport: Manages a single connection.

Currently the only SubchannelConnector and Transport implementations use HTTP/2, and the subchannel pool is hardcoded to use those implementations, but the Subchannel class now no longer has any HTTP/2-specific code and could be used with other transport implementations.

The purpose of this change is to fix #2176. Specifically, when the subchannel stops using a transport because it has received a GOAWAY, the subchannel will discard the transport, but the transport will continue to manage the connection, including sending pings, as long as it has open streams.

This change also includes the changes made in #2304 by @nicknotfun.

@murgatroid99 murgatroid99 changed the base branch from master to @grpc/grpc-js@1.8.x January 5, 2023 19:42
@murgatroid99 murgatroid99 merged commit a4d409d into grpc:@grpc/grpc-js@1.8.x Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Likely invalid handling of the goaway frames
3 participants