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

Evaluate & potentially replace https://github.com/soheilhy/cmux #18032

Open
ahrtr opened this issue May 20, 2024 · 3 comments
Open

Evaluate & potentially replace https://github.com/soheilhy/cmux #18032

ahrtr opened this issue May 20, 2024 · 3 comments
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature

Comments

@ahrtr
Copy link
Member

ahrtr commented May 20, 2024

What would you like to be added?

etcdserver depends on https://github.com/soheilhy/cmux to receive both gRPC and REST connections on the same TCP listener/port. But the library isn't well maintained; note it hasn't been updated for more than 3 years at the time of writing this ticket. It also has issue working with HTTP/2, please refer to soheilhy/cmux/issues.

We should evaluate & summarize the problems the library has, and

  • either try to find an alternative solution.
  • or completely separate gRPC and REST/HTTP connections;

I expect someone with more network expertise could drive this effort.

Why is this needed?

See above

@ahrtr ahrtr added type/feature priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels May 20, 2024
@serathius
Copy link
Member

cc @aojea

@fuweid
Copy link
Contributor

fuweid commented May 27, 2024

The ServeHTTP is still experimental feature in gRPC side https://pkg.go.dev/google.golang.org/grpc#Server.ServeHTTP.
There is different between gRPC and net/http about the underlying implementation of HTTP2 transport.
As far as I know, the gRPC implementation has some auto-tune features on window-update.
If there is good performance provided gRPC, I think we can consider using separate connections.

@serathius
Copy link
Member

I think we can consider using separate connections.

Using separate connections is much better as shown by #15402, however removing connection multiplexing would be a breaking change for users. If we look at the list of endpoints in #15402 (comment), the most impacted would be would be:

  • Users of /health via health probes, so I assume most of the users.
  • Users of /v3/* v3 grpc gateway, which based on the questionnaire we sent are more than we expected as not every programming language supports grpc.
  • Users of /metrics that didn't separate the port via --listen-metrics-urls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature
Development

No branches or pull requests

3 participants