L107: Node: Make Server#start a no-op#395
Merged
murgatroid99 merged 3 commits intogrpc:masterfrom Oct 17, 2023
Merged
Conversation
sanjaypujare
reviewed
Oct 3, 2023
|
|
||
| Currently, a `Server` object effectively has a two-phase startup sequence: first, the user calls `bindAsync` to bind a port, then they call `start` to start serving. Specifically, `bindAsync` puts the server into a state where it allows clients to establish HTTP/2 sessions on the specified port, but then immediately closes those sessions. `start` causes the server to stop closing those sessions, and to instead serve requests on them. | ||
|
|
||
| This behavior is problematic because allowing clients to establish HTTP/2 sessions signals to the client that the server is available, and clients will continue trying to connect to the same server instead of trying other servers. In addition, clients do not back off when reconnecting after a connection that was successfully established is closed, so this behavior will cause clients continuously reconnect with no backoff. |
Contributor
There was a problem hiding this comment.
What's the reason it was implemented in the first place? May be there was a use-case?
Member
Author
There was a problem hiding this comment.
This code was contributed by a third-party developer, and I didn't dig into it at the time. I think the primary objective at the time was to emulate the behavior of the wrapped library. In the wrapped library, bindAsync called grpc_server_add_insecure_http2_port or grpc_server_add_secure_http2_port, and start called grpc_server_start.
wenbozhu
approved these changes
Oct 4, 2023
This was referenced Oct 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.