-
Notifications
You must be signed in to change notification settings - Fork 3.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
core: experiment with a separate GRPC transport for node liveness #37195
Comments
Took me a while to get around to this. Preliminary data shows this to be extremely fruitful. On a given workload it's the difference between completely reliable node liveness failures and zero node liveness failures. That being said, I did notice a much higher rate of failures of query failures which I can't totally explain. Some of those failures are the usual
which then trips the breaker. From here I experimented with increasing the client and server keep-alives in gRPC, which anecdotally did help. I was a little bit frustrated by this situation and realized we hadn't updated gRPC in a while so I upgraded gRPC to 1.21 (the previous release and most recent with a point release, it seems like there may be a bug in the current release grpc/grpc-go#2663 (comment) for the potential issue and commentary on the bug). After performing the upgrade and running the same experiment with and without the separate connections I no longer see any connections actually break. I observe node liveness failures only on the version without the separate connection. The code with the separate connection as written is pretty gnarly but I think this is good enough evidence to move forward with cleaning it up. I'll put up a PR to upgrade gRPC first. |
HTTP/2 has a prioritization feature that is not exposed via GRPC (grpc/grpc-go#1448). I wonder if prioritization would get us the same benefit of a separate connection, and if it would be worth building this into GRPC. We might also be able to tune the grpc window size parameters. I think our connection window size is low relative to our per-stream window size, increasing the risk that this high-priority traffic gets starved out by low-priority bulk traffic. See also #35161 (cc @asubiotto) |
It's certainly possible. Doing it properly feels like a bigger reach for this release than adding a second rpc.Context.
I can play with this and see what I see. |
Yeah, doing prioritization properly in GRPC is definitely a bigger task, but we could at least be a voice of support on that 2-year-old issue. These liveness connections will also behave a bit differently than our others. We tend towards a fully-connected graph because any node may have to talk to any other, but the liveness connections will only be active to a single node at a time (the liveness range leaseholder). We should make sure that these connections get shut down after a period of idleness so we don't double our connection count. |
Good point. There's also the question of the remote clock tracking. One thing I notice on the primary connection is that the RTT can get artificially gigantic.
|
@ajwerner re the grpc upgrade, just a heads up that client-side keepalive minimums have been bumped up to 10s (grpc/grpc-go#2642) |
Indeed #39041 (comment) If only that were the only problem. |
Closed by #39172. |
... to determine whether GRPC/network has to do with unexpected node liveness fails.
The text was updated successfully, but these errors were encountered: