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

L107: Node: Make Server#start a no-op #395

Merged
merged 3 commits into from Oct 17, 2023

Conversation

murgatroid99
Copy link
Member

No description provided.


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.
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason it was implemented in the first place? May be there was a use-case?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

@murgatroid99 murgatroid99 merged commit a59cec7 into grpc:master Oct 17, 2023
1 check passed
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.

None yet

3 participants