-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
etcdserver: create separate goroutine to accept grpc tls connection #15451
Conversation
Signed-off-by: Benjamin Wang <wachao@vmware.com>
a722586
to
086a464
Compare
@@ -176,7 +176,8 @@ func (sctx *serveCtx) serve( | |||
if sctx.serviceRegister != nil { | |||
sctx.serviceRegister(gs) | |||
} | |||
handler = grpcHandlerFunc(gs, handler) | |||
grpcl := m.Match(cmux.HTTP2()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in original issue, using HTTP2 to separate grpc vs http2 traffic breaks backward compatibility
To avoid wasting work to rediscover same problem I recommend you take a look into main...serathius:etcd:fix-watch-starving This is a full implementation of what this PR tries. Unfortunately during testing I found that we cannot fix the issue without making a backward incompatible change. To make it explicit I have send separate PR that adds regression testing for cmux #15479 Results for my implementation:
Results for your implementation:
|
Try to resolve #15402
This solution has a major issue... the HTTP requests (e.g /health, /metrics, etc.) can't go through HTTP/2. Probably this issue should be resolved in
github.com/soheilhy/cmux
?Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.