-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support gRPC's Server-side Connection Management #782
Comments
@cherrot, Connect implementations (not just this one, but others, too) generally rely on standard libraries for the transport layer. To that end, a Connect client or server does not know anything about the underlying connections/sockets. In the case of this repo, for Go, all that is handled by Having said that, you might be interested in a client-side solution: https://github.com/bufbuild/httplb. Also consider using a headless service in Kubernetes. Combined with the "httplb" library mentioned above, the client would resolve all of the backend pods (since DNS queries for headless services provide all pod IPs) and then perform client-side load balancing across them. |
@jhump Thank you for the detailed explanation! From the original proposal:
I disagree with your perspective that server-side connection management is a matter of the transport layer. IMHO it is an application-layer logic based on the HTTP/2 GOAWAY frame implementation. Consider Connect supports multiple HTTP protocols (HTTP/1.1 and HTTP/2), it might be challenging to design a connection control mechanism that only works for HTTP/2 on top of this compatibility. However, I think |
Is your feature request related to a problem? Please describe.
https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md
I will not elaborate on the benefits of implementing server-side connection management (you can refer to the original proposal above), but I need to explain why we urgently need this feature: communication within K8s clusters via service endpoint is by default implemented as a L4 LB, which prevents gRPC clients from promptly detecting service Pod scaling, leading to unbalanced loads. (In my case I heavily use bidi stream RPCs so HTTP/2 connection is inevitable)
However, if server-side connection management is supported, it can achieve load balance by actively disconnecting and reconnecting to the underlying gRPC service Pods.
Here is a good article (and illustration) explaining this resolution on gRPC world:
How three lines of configuration solved our gRPC scaling issues in Kubernetes
Describe the solution you'd like
Implement Server-side Connection Management. Specifically, the
MAX_CONNECTION_AGE
andMAX_CONNECTION_AGE_GRACE
parts of the original proposal.Additional context
I saw a similar feature request in
connect-es
project: connectrpc/connect-es#752The text was updated successfully, but these errors were encountered: